summaryrefslogtreecommitdiff
path: root/include/net/ip6_fib.h
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2023-03-28 02:54:54 +0300
committerDavid S. Miller <davem@davemloft.net>2023-03-29 10:22:52 +0300
commit8cdc3223e78c43e1b60ea1c536a103e32fdca3c5 (patch)
tree3972c8125de0fb306008fc0e25e1d89ecfd3aec0 /include/net/ip6_fib.h
parent5a8c8b72f65f6b80b52b21a207a4ddc3011d6440 (diff)
downloadlinux-8cdc3223e78c43e1b60ea1c536a103e32fdca3c5.tar.xz
ipv6: Remove in6addr_any alternatives.
Some code defines the IPv6 wildcard address as a local variable and use it with memcmp() or ipv6_addr_equal(). Let's use in6addr_any and ipv6_addr_any() instead. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip6_fib.h')
-rw-r--r--include/net/ip6_fib.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 79570cb4ea9c..05e6f756feaf 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -469,13 +469,10 @@ void rt6_get_prefsrc(const struct rt6_info *rt, struct in6_addr *addr)
rcu_read_lock();
from = rcu_dereference(rt->from);
- if (from) {
+ if (from)
*addr = from->fib6_prefsrc.addr;
- } else {
- struct in6_addr in6_zero = {};
-
- *addr = in6_zero;
- }
+ else
+ *addr = in6addr_any;
rcu_read_unlock();
}