提交 d985d151 编写于 作者: E Eric Dumazet 提交者: David S. Miller

net: ipv4: fix sparse error in fib_good_nh()

Fixes following sparse errors :

net/ipv4/fib_semantics.c:1579:61: warning: incorrect type in argument 2
(different base types)
net/ipv4/fib_semantics.c:1579:61:    expected unsigned int [unsigned]
[usertype] key
net/ipv4/fib_semantics.c:1579:61:    got restricted __be32 const
[usertype] nh_gw

Fixes: a6db4494 ("net: ipv4: Consider failed nexthops in multipath routes")
Signed-off-by: NEric Dumazet <edumazet@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 217375a0
......@@ -1576,7 +1576,8 @@ static bool fib_good_nh(const struct fib_nh *nh)
rcu_read_lock_bh();
n = __ipv4_neigh_lookup_noref(nh->nh_dev, nh->nh_gw);
n = __ipv4_neigh_lookup_noref(nh->nh_dev,
(__force u32)nh->nh_gw);
if (n)
state = n->nud_state;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册