Browse Source

[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>
tags/v1.20.1
Michael Brown 9 years ago
parent
commit
15759e539e
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/net/neighbour.c

+ 1
- 1
src/net/neighbour.c View File

@@ -322,7 +322,7 @@ int neighbour_tx ( struct io_buffer *iobuf, struct net_device *netdev,
322 322
 			netdev->name, net_protocol->name,
323 323
 			net_protocol->ntoa ( net_dest ) );
324 324
 		list_add_tail ( &iobuf->list, &neighbour->tx_queue );
325
-		return -EAGAIN;
325
+		return 0;
326 326
 	}
327 327
 }
328 328
 

Loading…
Cancel
Save