summaryrefslogtreecommitdiffstats
path: root/src/net/ndp.c
diff options
context:
space:
mode:
authorMichael Brown2013-10-25 14:48:18 +0200
committerMichael Brown2013-10-25 14:49:51 +0200
commitfec127cb07c05bb0497e6bf672179132b8dd5456 (patch)
treed6333b9de0c822eab3224e651db91b794aeb48d3 /src/net/ndp.c
parent[ipv6] Support stateless address autoconfiguration (SLAAC) (diff)
downloadipxe-fec127cb07c05bb0497e6bf672179132b8dd5456.tar.gz
ipxe-fec127cb07c05bb0497e6bf672179132b8dd5456.tar.xz
ipxe-fec127cb07c05bb0497e6bf672179132b8dd5456.zip
[ipv6] Treat sin6_scope_id consistently
sin6_scope_id is never exposed outside of the local system, and so should be a native-endian quantity. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/ndp.c')
-rw-r--r--src/net/ndp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/ndp.c b/src/net/ndp.c
index cc57478a..c440435d 100644
--- a/src/net/ndp.c
+++ b/src/net/ndp.c
@@ -119,12 +119,12 @@ static int ndp_tx_request ( struct net_device *netdev,
sin6_src.sin6_family = AF_INET6;
memcpy ( &sin6_src.sin6_addr, net_source,
sizeof ( sin6_src.sin6_addr ) );
- sin6_src.sin6_scope_id = htons ( netdev->index );
+ sin6_src.sin6_scope_id = netdev->index;
/* Construct multicast destination address */
memset ( &sin6_dest, 0, sizeof ( sin6_dest ) );
sin6_dest.sin6_family = AF_INET6;
- sin6_dest.sin6_scope_id = htons ( netdev->index );
+ sin6_dest.sin6_scope_id = netdev->index;
ipv6_solicited_node ( &sin6_dest.sin6_addr, net_dest );
/* Transmit neighbour discovery packet */