summaryrefslogtreecommitdiffstats
path: root/src/net/ipv6.c
diff options
context:
space:
mode:
authorMichael Brown2013-09-01 21:55:18 +0200
committerMichael Brown2013-09-03 03:02:58 +0200
commit6bf36f57a0f7a22ffa85ae4995933077df62e309 (patch)
tree46822c3bbedc5fea9c395daf313fd83803131f81 /src/net/ipv6.c
parent[linux] Apply MAC address prior to registering network device (diff)
downloadipxe-6bf36f57a0f7a22ffa85ae4995933077df62e309.tar.gz
ipxe-6bf36f57a0f7a22ffa85ae4995933077df62e309.tar.xz
ipxe-6bf36f57a0f7a22ffa85ae4995933077df62e309.zip
[tcpip] Pass through network device to transport layer protocols
NDP requires knowledge of the network device on which a packet was received. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/ipv6.c')
-rw-r--r--src/net/ipv6.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/ipv6.c b/src/net/ipv6.c
index d76e59cb..077118df 100644
--- a/src/net/ipv6.c
+++ b/src/net/ipv6.c
@@ -260,7 +260,8 @@ static int ipv6_tx ( struct io_buffer *iobuf,
*
* Refer http://www.iana.org/assignments/ipv6-parameters for the numbers
*/
-static int ipv6_process_nxt_hdr ( struct io_buffer *iobuf, uint8_t nxt_hdr,
+static int ipv6_process_nxt_hdr ( struct io_buffer *iobuf,
+ struct net_device *netdev, uint8_t nxt_hdr,
struct sockaddr_tcpip *src, struct sockaddr_tcpip *dest ) {
switch ( nxt_hdr ) {
case IP6_HOPBYHOP:
@@ -278,7 +279,7 @@ static int ipv6_process_nxt_hdr ( struct io_buffer *iobuf, uint8_t nxt_hdr,
return 0;
}
/* Next header is not a IPv6 extension header */
- return tcpip_rx ( iobuf, nxt_hdr, src, dest, 0 /* fixme */ );
+ return tcpip_rx ( iobuf, netdev, nxt_hdr, src, dest, 0 /* fixme */ );
}
/**
@@ -344,7 +345,7 @@ static int ipv6_rx ( struct io_buffer *iobuf,
iob_pull ( iobuf, sizeof ( *ip6hdr ) );
/* Send it to the transport layer */
- return ipv6_process_nxt_hdr ( iobuf, ip6hdr->nxt_hdr, &src.st, &dest.st );
+ return ipv6_process_nxt_hdr ( iobuf, netdev, ip6hdr->nxt_hdr, &src.st, &dest.st );
drop:
DBG ( "Packet dropped\n" );