Skip to content
Snippets Groups Projects
Commit 1a38c43d authored by David Ahern's avatar David Ahern Committed by David S. Miller
Browse files

ipv4: Handle ipv6 gateway in fib_good_nh


Update fib_good_nh to handle an ipv6 gateway.

Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 619d1826
No related branches found
No related tags found
No related merge requests found
...@@ -1909,8 +1909,14 @@ static bool fib_good_nh(const struct fib_nh *nh) ...@@ -1909,8 +1909,14 @@ static bool fib_good_nh(const struct fib_nh *nh)
rcu_read_lock_bh(); rcu_read_lock_bh();
if (likely(nh->fib_nh_gw_family == AF_INET))
n = __ipv4_neigh_lookup_noref(nh->fib_nh_dev, n = __ipv4_neigh_lookup_noref(nh->fib_nh_dev,
(__force u32)nh->fib_nh_gw4); (__force u32)nh->fib_nh_gw4);
else if (nh->fib_nh_gw_family == AF_INET6)
n = __ipv6_neigh_lookup_noref_stub(nh->fib_nh_dev,
&nh->fib_nh_gw6);
else
n = NULL;
if (n) if (n)
state = n->nud_state; state = n->nud_state;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment