netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv6 addrconf: Ignore requests to set NODAD flag when changing addresses
@ 2008-06-04 23:47 Thomas Graf
  2008-06-05  2:53 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Graf @ 2008-06-04 23:47 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki; +Cc: netdev

The decision to run DAD has already been made at the time the address
was added. Changing the flag later on does not have any effect and
is only confusing.

Signed-off-by: Thomas Graf <tgraf@suug.ch>

Index: net-2.6/net/ipv6/addrconf.c
===================================================================
--- net-2.6.orig/net/ipv6/addrconf.c	2008-06-04 22:57:41.000000000 +0200
+++ net-2.6/net/ipv6/addrconf.c	2008-06-04 22:59:11.000000000 +0200
@@ -3200,7 +3200,7 @@
 	}
 
 	spin_lock_bh(&ifp->lock);
-	ifp->flags = (ifp->flags & ~(IFA_F_DEPRECATED | IFA_F_PERMANENT | IFA_F_NODAD | IFA_F_HOMEADDRESS)) | ifa_flags;
+	ifp->flags = (ifp->flags & ~(IFA_F_DEPRECATED | IFA_F_PERMANENT | IFA_F_HOMEADDRESS)) | ifa_flags;
 	ifp->tstamp = jiffies;
 	ifp->valid_lft = valid_lft;
 	ifp->prefered_lft = prefered_lft;
@@ -3267,6 +3267,9 @@
 				      preferred_lft, valid_lft);
 	}
 
+	/* It's too late to disable DOD now, ignore the flag */
+	ifa_flags &= ~IFA_F_NODAD;
+
 	if (nlh->nlmsg_flags & NLM_F_EXCL ||
 	    !(nlh->nlmsg_flags & NLM_F_REPLACE))
 		err = -EEXIST;

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-05 20:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-04 23:47 [PATCH] ipv6 addrconf: Ignore requests to set NODAD flag when changing addresses Thomas Graf
2008-06-05  2:53 ` YOSHIFUJI Hideaki / 吉藤英明
2008-06-05  9:04   ` Thomas Graf
2008-06-05 14:32     ` YOSHIFUJI Hideaki / 吉藤英明
2008-06-05 20:14       ` Thomas Graf

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).