summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2026-01-05 15:22:16 +0100
committerMichael Brown2026-01-05 15:22:16 +0100
commitd0e01bb3fcf434abc7b20c399cfab6d8a2d36986 (patch)
treea6b2e2b5b09e2cddc8d98681f1d9f32e873cd883 /src/include
parent[crypto] Allow for zero-length big integer literals (diff)
downloadipxe-d0e01bb3fcf434abc7b20c399cfab6d8a2d36986.tar.gz
ipxe-d0e01bb3fcf434abc7b20c399cfab6d8a2d36986.tar.xz
ipxe-d0e01bb3fcf434abc7b20c399cfab6d8a2d36986.zip
[neighbour] Always use network device's own link-layer address
The API for neighbour_tx() allows for an explicit source link-layer address, but this will be ignored if the packet is deferred for transmission after completion of neighbour discovery. The network device's own link-layer address will always be used when sending neighbour discovery packets, and when sending any deferred packets after discovery completes. All callers pass in the network device's own link-layer address as the source address anyway, and so this explicit source link-layer address is never used for any meaningful purpose. Simplify the neighbour_tx() API by removing the ability to pass in an explicit source link-layer address. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ipxe/arp.h6
-rw-r--r--src/include/ipxe/ndp.h6
-rw-r--r--src/include/ipxe/neighbour.h2
3 files changed, 5 insertions, 9 deletions
diff --git a/src/include/ipxe/arp.h b/src/include/ipxe/arp.h
index 5822fa095..674423c54 100644
--- a/src/include/ipxe/arp.h
+++ b/src/include/ipxe/arp.h
@@ -45,16 +45,14 @@ extern struct neighbour_discovery arp_discovery;
* @v net_protocol Network-layer protocol
* @v net_dest Destination network-layer address
* @v net_source Source network-layer address
- * @v ll_source Source link-layer address
* @ret rc Return status code
*/
static inline int arp_tx ( struct io_buffer *iobuf, struct net_device *netdev,
struct net_protocol *net_protocol,
- const void *net_dest, const void *net_source,
- const void *ll_source ) {
+ const void *net_dest, const void *net_source ) {
return neighbour_tx ( iobuf, netdev, net_protocol, net_dest,
- &arp_discovery, net_source, ll_source );
+ &arp_discovery, net_source );
}
extern int arp_tx_request ( struct net_device *netdev,
diff --git a/src/include/ipxe/ndp.h b/src/include/ipxe/ndp.h
index 1815236f5..d06672ec1 100644
--- a/src/include/ipxe/ndp.h
+++ b/src/include/ipxe/ndp.h
@@ -189,15 +189,13 @@ extern struct neighbour_discovery ndp_discovery;
* @v netdev Network device
* @v net_dest Destination network-layer address
* @v net_source Source network-layer address
- * @v ll_source Source link-layer address
* @ret rc Return status code
*/
static inline int ndp_tx ( struct io_buffer *iobuf, struct net_device *netdev,
- const void *net_dest, const void *net_source,
- const void *ll_source ) {
+ const void *net_dest, const void *net_source ) {
return neighbour_tx ( iobuf, netdev, &ipv6_protocol, net_dest,
- &ndp_discovery, net_source, ll_source );
+ &ndp_discovery, net_source );
}
/** NDP settings block name */
diff --git a/src/include/ipxe/neighbour.h b/src/include/ipxe/neighbour.h
index 1c1d1b6ca..1ca0ee333 100644
--- a/src/include/ipxe/neighbour.h
+++ b/src/include/ipxe/neighbour.h
@@ -77,7 +77,7 @@ extern int neighbour_tx ( struct io_buffer *iobuf, struct net_device *netdev,
struct net_protocol *net_protocol,
const void *net_dest,
struct neighbour_discovery *discovery,
- const void *net_source, const void *ll_source );
+ const void *net_source );
extern int neighbour_update ( struct net_device *netdev,
struct net_protocol *net_protocol,
const void *net_dest, const void *ll_dest );