* ipv6: Send netlink notification when DAD fails
@ 2010-03-13 11:11 Herbert Xu
2010-03-13 20:23 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Herbert Xu @ 2010-03-13 11:11 UTC (permalink / raw)
To: David S. Miller, netdev
Hi:
ipv6: Send netlink notification when DAD fails
If we are managing IPv6 addresses using DHCP, it would be nice
for user-space to be notified if an address configured through
DHCP fails DAD. Otherwise user-space would have to poll to see
whether DAD succeeds.
This patch uses the existing notification mechanism and simply
hooks it into the DAD failure code path.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 88fd8c5..01d142e 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1380,6 +1380,8 @@ static void addrconf_dad_stop(struct inet6_ifaddr *ifp, int dad_failed)
if (dad_failed)
ifp->flags |= IFA_F_DADFAILED;
spin_unlock_bh(&ifp->lock);
+ if (dad_failed)
+ ipv6_ifa_notify(0, ifp);
in6_ifa_put(ifp);
#ifdef CONFIG_IPV6_PRIVACY
} else if (ifp->flags&IFA_F_TEMPORARY) {
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: ipv6: Send netlink notification when DAD fails
2010-03-13 11:11 ipv6: Send netlink notification when DAD fails Herbert Xu
@ 2010-03-13 20:23 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-03-13 20:23 UTC (permalink / raw)
To: herbert; +Cc: netdev
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Sat, 13 Mar 2010 19:11:17 +0800
> ipv6: Send netlink notification when DAD fails
>
> If we are managing IPv6 addresses using DHCP, it would be nice
> for user-space to be notified if an address configured through
> DHCP fails DAD. Otherwise user-space would have to poll to see
> whether DAD succeeds.
>
> This patch uses the existing notification mechanism and simply
> hooks it into the DAD failure code path.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied, thanks Herbert.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-13 20:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-13 11:11 ipv6: Send netlink notification when DAD fails Herbert Xu
2010-03-13 20:23 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).