netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IPv6: Protect proxied addresses against DAD
@ 2003-08-20 11:40 Ville Nuorvala
  2003-08-20 11:43 ` (usagi-core 15040) " YOSHIFUJI Hideaki / 吉藤英明
  2003-08-20 18:24 ` David S. Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Ville Nuorvala @ 2003-08-20 11:40 UTC (permalink / raw)
  To: davem, usagi-core; +Cc: netdev

[-- Attachment #1: Type: TEXT/PLAIN, Size: 402 bytes --]

Hi,

a proxy has to reply to DAD probes, otherwise it can't protect its
addresses. The attached patch fixes this, please apply!

Thanks,
Ville

PS. Dave, you misspelled my email address in csets 1.1199.1.10,
1.1199.1.12 and 1.1199.1.16 ;)
--
Ville Nuorvala
Research Assistant, Institute of Digital Communications,
Helsinki University of Technology
email: vnuorval@tcs.hut.fi, phone: +358 (0)9 451 5257

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1310 bytes --]

--- linux-2.5.OLD/net/ipv6/ndisc.c	2003-08-20 14:10:16.000000000 +0300
+++ linux-2.5/net/ipv6/ndisc.c	2003-08-20 14:10:30.000000000 +0300
@@ -861,7 +861,8 @@
 		struct inet6_dev *in6_dev = in6_dev_get(dev);
 
 		if (in6_dev && in6_dev->cnf.forwarding &&
-		    (addr_type & IPV6_ADDR_UNICAST) &&
+		    (addr_type & IPV6_ADDR_UNICAST ||
+		     addr_type == IPV6_ADDR_ANY) &&
 		    pneigh_lookup(&nd_tbl, &msg->target, dev, 0)) {
 			int inc = ipv6_addr_type(daddr)&IPV6_ADDR_MULTICAST;
 
@@ -874,12 +875,20 @@
 				else
 					nd_tbl.stats.rcv_probes_ucast++;
 					
-				neigh = neigh_event_ns(&nd_tbl, lladdr, saddr, dev);
+				if (addr_type & IPV6_ADDR_UNICAST) {
+					neigh = neigh_event_ns(&nd_tbl, lladdr, saddr, dev);
 
-				if (neigh) {
-					ndisc_send_na(dev, neigh, saddr, &msg->target,
-						      0, 1, 0, 1);
-					neigh_release(neigh);
+					if (neigh) {
+						ndisc_send_na(dev, neigh, saddr, &msg->target,
+							      0, 1, 0, 1);
+						neigh_release(neigh);
+					}
+				} else {
+					/* proxy should also protect against DAD */
+					struct in6_addr maddr;
+					ipv6_addr_all_nodes(&maddr);
+					ndisc_send_na(dev, NULL, &maddr, &msg->target, 
+						      0, 0, 0, 1);
 				}
 			} else {
 				struct sk_buff *n = skb_clone(skb, GFP_ATOMIC);

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

end of thread, other threads:[~2003-08-20 18:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-20 11:40 [PATCH] IPv6: Protect proxied addresses against DAD Ville Nuorvala
2003-08-20 11:43 ` (usagi-core 15040) " YOSHIFUJI Hideaki / 吉藤英明
2003-08-20 12:58   ` Ville Nuorvala
2003-08-20 13:39     ` YOSHIFUJI Hideaki / 吉藤英明
2003-08-20 18:24 ` David S. 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).