PXELINUX: Use sendto() instead of connect()/send()/disconnect()
commit131b9981b8dbf5fa1c014995f44b10b7b099fe12
authorGene Cumm <gene.cumm@gmail.com>
Mon, 23 Sep 2013 21:13:53 +0000 (23 17:13 -0400)
committerGene Cumm <gene.cumm@gmail.com>
Mon, 23 Sep 2013 21:13:53 +0000 (23 17:13 -0400)
tree8f660bac2786b551872e46c1450a40c0029361da
parentceb14335790f70378dddfbf0202d2bcda0c54a03
PXELINUX: Use sendto() instead of connect()/send()/disconnect()

This commit prevents a race-condition on systems that have functional
interrupts (observed with iPXE and select other Dell systems).  Without
this, the reply packet could be received by the core prior to the
disconnect() call, see that it doesn't have a matching PCB (protocol
control block, iirc) since the reply has a different far-end UDP port
than the original request, and lwIP will discard the packet before
PXELINUX can see it.

net_core_sendto() instead of
net_core_connect() net_core_send() net_core_disconnect()

Commit message expanded with Matt Fleming's assistance

Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
core/fs/pxe/core.c
core/fs/pxe/tftp.c
core/include/net.h
core/legacynet/core.c