summaryrefslogtreecommitdiffstats
path: root/include/net/addrconf.h
diff options
context:
space:
mode:
authorNeil Horman <nhorman@tuxdriver.com>2012-01-04 10:49:15 +0000
committerDavid S. Miller <davem@davemloft.net>2012-01-04 15:53:20 -0500
commite6bff995f8fe78f74cbe8f14bf6a31f3560b9ce4 (patch)
tree6f3dd815508bd265c9d272bea1a1e0300e09bef3 /include/net/addrconf.h
parent02a9098ede0dc7e28c16a03fa7fba86a05219478 (diff)
downloadop-kernel-dev-e6bff995f8fe78f74cbe8f14bf6a31f3560b9ce4.zip
op-kernel-dev-e6bff995f8fe78f74cbe8f14bf6a31f3560b9ce4.tar.gz
ipv6: Check RA for sllao when configuring optimistic ipv6 address (v2)
Recently Dave noticed that a test we did in ipv6_add_addr to see if we next hop route for the interface we're adding an addres to was wrong (see commit 7ffbcecbeed91e5874e9a1cfc4c0cbb07dac3069). for one, it never triggers, and two, it was completely wrong to begin with. This test was meant to cover this section of RFC 4429: 3.3 Modifications to RFC 2462 Stateless Address Autoconfiguration * (modifies section 5.5) A host MAY choose to configure a new address as an Optimistic Address. A host that does not know the SLLAO of its router SHOULD NOT configure a new address as Optimistic. A router SHOULD NOT configure an Optimistic Address. This patch should bring us into proper compliance with the above clause. Since we only add a SLAAC address after we've received a RA which may or may not contain a source link layer address option, we can pass a pointer to that option to addrconf_prefix_rcv (which may be null if the option is not present), and only set the optimistic flag if the option was found in the RA. Change notes: (v2) modified the new parameter to addrconf_prefix_rcv to be a bool rather than a pointer to make its use more clear as per request from davem. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: "David S. Miller" <davem@davemloft.net> CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/addrconf.h')
-rw-r--r--include/net/addrconf.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index cbc6bb0..f68dce2 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -151,7 +151,8 @@ extern int ipv6_chk_mcast_addr(struct net_device *dev,
const struct in6_addr *src_addr);
extern int ipv6_is_mld(struct sk_buff *skb, int nexthdr);
-extern void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len);
+extern void addrconf_prefix_rcv(struct net_device *dev,
+ u8 *opt, int len, bool sllao);
/*
* anycast prototypes (anycast.c)
OpenPOWER on IntegriCloud