* [PATCH] IPv6: use ipv6_addr_any() for testing unspecified address
@ 2003-03-22 16:35 YOSHIFUJI Hideaki / 吉藤英明
2003-03-24 5:41 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2003-03-22 16:35 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: davem, kuznet, usagi
Hello.
Use ipv6_addr_any() for testing unspecified address.
Patch is for linux-2.5.65 + ChangeSet 1.1188.
This should be suitable for linux-2.4.x.
Thanks in advance.
Index: net/ipv6/addrconf.c
===================================================================
RCS file: /cvsroot/usagi/usagi-backport/linux25/net/ipv6/addrconf.c,v
retrieving revision 1.1.1.8.4.3
retrieving revision 1.1.1.8.4.4
diff -u -r1.1.1.8.4.3 -r1.1.1.8.4.4
--- net/ipv6/addrconf.c 22 Mar 2003 15:16:50 -0000 1.1.1.8.4.3
+++ net/ipv6/addrconf.c 22 Mar 2003 15:27:05 -0000 1.1.1.8.4.4
@@ -426,8 +426,7 @@
}
for (ifa=idev->addr_list; ifa; ifa=ifa->if_next) {
ipv6_addr_prefix(&addr, &ifa->addr, ifa->prefix_len);
- if (addr.s6_addr32[0] == 0 && addr.s6_addr32[1] == 0 &&
- addr.s6_addr32[2] == 0 && addr.s6_addr32[3] == 0)
+ if (ipv6_addr_any(&addr))
continue;
if (idev->cnf.forwarding)
ipv6_dev_ac_inc(idev->dev, &addr);
@@ -2030,8 +2029,7 @@
struct in6_addr addr;
ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
- if (addr.s6_addr32[0] || addr.s6_addr32[1] ||
- addr.s6_addr32[2] || addr.s6_addr32[3])
+ if (!ipv6_addr_any(&addr))
ipv6_dev_ac_inc(ifp->idev->dev, &addr);
}
}
@@ -2368,8 +2366,7 @@
struct in6_addr addr;
ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
- if (addr.s6_addr32[0] || addr.s6_addr32[1] ||
- addr.s6_addr32[2] || addr.s6_addr32[3])
+ if (!ipv6_addr_any(&addr))
ipv6_dev_ac_dec(ifp->idev->dev, &addr);
}
if (!ipv6_chk_addr(&ifp->addr, NULL))
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] IPv6: use ipv6_addr_any() for testing unspecified address
2003-03-22 16:35 [PATCH] IPv6: use ipv6_addr_any() for testing unspecified address YOSHIFUJI Hideaki / 吉藤英明
@ 2003-03-24 5:41 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2003-03-24 5:41 UTC (permalink / raw)
To: yoshfuji; +Cc: linux-kernel, netdev, kuznet, usagi
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Date: Sun, 23 Mar 2003 01:35:35 +0900 (JST)
Use ipv6_addr_any() for testing unspecified address.
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-24 5:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-22 16:35 [PATCH] IPv6: use ipv6_addr_any() for testing unspecified address YOSHIFUJI Hideaki / 吉藤英明
2003-03-24 5:41 ` David S. Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.