From 6bf36f57a0f7a22ffa85ae4995933077df62e309 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 1 Sep 2013 20:55:18 +0100 Subject: [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 --- src/net/ipv6.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/net/ipv6.c') diff --git a/src/net/ipv6.c b/src/net/ipv6.c index d76e59cbd..077118df6 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" ); -- cgit v1.2.3-55-g7522