mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-10 07:44:23 +08:00
ipv4: remove sparse error in ip_neigh_gw4()
[ Upstream commit3c42b20198
] ./include/net/route.h:373:48: warning: incorrect type in argument 2 (different base types) ./include/net/route.h:373:48: expected unsigned int [usertype] key ./include/net/route.h:373:48: got restricted __be32 [usertype] daddr Fixes:5c9f7c1dfc
("ipv4: Add helpers for neigh lookup for nexthop") Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20220127013404.1279313-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d887a33724
commit
8861857ccc
@ -369,7 +369,7 @@ static inline struct neighbour *ip_neigh_gw4(struct net_device *dev,
|
||||
{
|
||||
struct neighbour *neigh;
|
||||
|
||||
neigh = __ipv4_neigh_lookup_noref(dev, daddr);
|
||||
neigh = __ipv4_neigh_lookup_noref(dev, (__force u32)daddr);
|
||||
if (unlikely(!neigh))
|
||||
neigh = __neigh_create(&arp_tbl, &daddr, dev, false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user