Commit bed9655b authored by Hideaki Yoshifuji's avatar Hideaki Yoshifuji Committed by David S. Miller

[IPV6]: Use ipv6_addr_any() for testing unspecified address.

parent a895254c
...@@ -426,8 +426,7 @@ static void dev_forward_change(struct inet6_dev *idev) ...@@ -426,8 +426,7 @@ static void dev_forward_change(struct inet6_dev *idev)
} }
for (ifa=idev->addr_list; ifa; ifa=ifa->if_next) { for (ifa=idev->addr_list; ifa; ifa=ifa->if_next) {
ipv6_addr_prefix(&addr, &ifa->addr, ifa->prefix_len); ipv6_addr_prefix(&addr, &ifa->addr, ifa->prefix_len);
if (addr.s6_addr32[0] == 0 && addr.s6_addr32[1] == 0 && if (ipv6_addr_any(&addr))
addr.s6_addr32[2] == 0 && addr.s6_addr32[3] == 0)
continue; continue;
if (idev->cnf.forwarding) if (idev->cnf.forwarding)
ipv6_dev_ac_inc(idev->dev, &addr); ipv6_dev_ac_inc(idev->dev, &addr);
...@@ -2030,8 +2029,7 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp) ...@@ -2030,8 +2029,7 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp)
struct in6_addr addr; struct in6_addr addr;
ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len); ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
if (addr.s6_addr32[0] || addr.s6_addr32[1] || if (!ipv6_addr_any(&addr))
addr.s6_addr32[2] || addr.s6_addr32[3])
ipv6_dev_ac_inc(ifp->idev->dev, &addr); ipv6_dev_ac_inc(ifp->idev->dev, &addr);
} }
} }
...@@ -2368,8 +2366,7 @@ static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) ...@@ -2368,8 +2366,7 @@ static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
struct in6_addr addr; struct in6_addr addr;
ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len); ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
if (addr.s6_addr32[0] || addr.s6_addr32[1] || if (!ipv6_addr_any(&addr))
addr.s6_addr32[2] || addr.s6_addr32[3])
ipv6_dev_ac_dec(ifp->idev->dev, &addr); ipv6_dev_ac_dec(ifp->idev->dev, &addr);
} }
if (!ipv6_chk_addr(&ifp->addr, NULL)) if (!ipv6_chk_addr(&ifp->addr, NULL))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment