From 2d31573284c6f087dba9d3819d37629e43abcebd Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Wed, 4 Jan 2012 10:49:15 +0000 Subject: [PATCH] --- yaml --- r: 279414 b: refs/heads/master c: e6bff995f8fe78f74cbe8f14bf6a31f3560b9ce4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/addrconf.h | 3 ++- trunk/net/ipv6/addrconf.c | 4 ++-- trunk/net/ipv6/ndisc.c | 4 +++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 17f0b3f0a8a5..ba62beb6a7e5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 02a9098ede0dc7e28c16a03fa7fba86a05219478 +refs/heads/master: e6bff995f8fe78f74cbe8f14bf6a31f3560b9ce4 diff --git a/trunk/include/net/addrconf.h b/trunk/include/net/addrconf.h index cbc6bb0a6838..f68dce2d8d88 100644 --- a/trunk/include/net/addrconf.h +++ b/trunk/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) diff --git a/trunk/net/ipv6/addrconf.c b/trunk/net/ipv6/addrconf.c index 647e6cba237d..3513cceba50a 100644 --- a/trunk/net/ipv6/addrconf.c +++ b/trunk/net/ipv6/addrconf.c @@ -1803,7 +1803,7 @@ static struct inet6_dev *addrconf_add_dev(struct net_device *dev) return idev; } -void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len) +void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao) { struct prefix_info *pinfo; __u32 valid_lft; @@ -1934,7 +1934,7 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len) #ifdef CONFIG_IPV6_OPTIMISTIC_DAD if (in6_dev->cnf.optimistic_dad && - !net->ipv6.devconf_all->forwarding) + !net->ipv6.devconf_all->forwarding && sllao) addr_flags = IFA_F_OPTIMISTIC; #endif diff --git a/trunk/net/ipv6/ndisc.c b/trunk/net/ipv6/ndisc.c index 3b1fe4b3f3c6..d8f02ef88e59 100644 --- a/trunk/net/ipv6/ndisc.c +++ b/trunk/net/ipv6/ndisc.c @@ -1368,7 +1368,9 @@ static void ndisc_router_discovery(struct sk_buff *skb) for (p = ndopts.nd_opts_pi; p; p = ndisc_next_option(p, ndopts.nd_opts_pi_end)) { - addrconf_prefix_rcv(skb->dev, (u8*)p, (p->nd_opt_len) << 3); + addrconf_prefix_rcv(skb->dev, (u8 *)p, + (p->nd_opt_len) << 3, + ndopts.nd_opts_src_lladdr != NULL); } }