Commit e066008b authored by David S. Miller's avatar David S. Miller

ipv4: Fix __ip_dev_find() to use ifa_local instead of ifa_address.

Reported-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Reported-by: default avatarJulian Anastasov <ja@ssi.bg>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d276055c
...@@ -111,7 +111,7 @@ static inline unsigned int inet_addr_hash(struct net *net, __be32 addr) ...@@ -111,7 +111,7 @@ static inline unsigned int inet_addr_hash(struct net *net, __be32 addr)
static void inet_hash_insert(struct net *net, struct in_ifaddr *ifa) static void inet_hash_insert(struct net *net, struct in_ifaddr *ifa)
{ {
unsigned int hash = inet_addr_hash(net, ifa->ifa_address); unsigned int hash = inet_addr_hash(net, ifa->ifa_local);
spin_lock(&inet_addr_hash_lock); spin_lock(&inet_addr_hash_lock);
hlist_add_head_rcu(&ifa->hash, &inet_addr_lst[hash]); hlist_add_head_rcu(&ifa->hash, &inet_addr_lst[hash]);
...@@ -146,7 +146,7 @@ struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref) ...@@ -146,7 +146,7 @@ struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref)
if (!net_eq(dev_net(dev), net)) if (!net_eq(dev_net(dev), net))
continue; continue;
if (ifa->ifa_address == addr) { if (ifa->ifa_local == addr) {
result = dev; result = dev;
break; break;
} }
......
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