aboutsummaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2015-05-20 15:19:47 +0100
committerMichael Brown <mcb30@ipxe.org>2015-05-20 15:29:36 +0100
commit15759e539e2fd0d33ef4f68c92942807f2048a29 (patch)
tree3b41d85cebbb92aafec6579159b192f847cc5a82 /src/net
parent99f87b23382ab9cf1d071f4efea834e18d4511e0 (diff)
downloadipxe-15759e539e2fd0d33ef4f68c92942807f2048a29.zip
ipxe-15759e539e2fd0d33ef4f68c92942807f2048a29.tar.gz
ipxe-15759e539e2fd0d33ef4f68c92942807f2048a29.tar.bz2
[neighbour] Return success when deferring a packet
Deferral of a packet for neighbour discovery is not really an error. If we fail to discover a neighbour then the failure will eventually be reported by the call to neighbour_destroy() when any outstanding I/O buffers are discarded. The current behaviour breaks PXE booting on FreeBSD, which seems to treat the error return from PXENV_UDP_WRITE as a fatal error and so never proceeds to poll PXENV_UDP_READ (and hence never allows iPXE to receive the ARP reply and send the deferred UDP packet). Change neighbour_tx() to return success when deferring a packet. This fixes interoperability with FreeBSD and removes transient neighbour cache misses from the "ifstat" error output, while leaving genuine neighbour discovery failures visible via "ifstat" (once neighbour discovery times out, or the interface is closed). Debugged-by: Wissam Shoukair <wissams@mellanox.com> Tested-by: Wissam Shoukair <wissams@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net')
-rw-r--r--src/net/neighbour.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/neighbour.c b/src/net/neighbour.c
index f70896a..7f66d99 100644
--- a/src/net/neighbour.c
+++ b/src/net/neighbour.c
@@ -322,7 +322,7 @@ int neighbour_tx ( struct io_buffer *iobuf, struct net_device *netdev,
netdev->name, net_protocol->name,
net_protocol->ntoa ( net_dest ) );
list_add_tail ( &iobuf->list, &neighbour->tx_queue );
- return -EAGAIN;
+ return 0;
}
}