summary refs log tree commit diff
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-03 11:24:19 -0800
committerDavid S. Miller <davem@davemloft.net>2011-03-03 11:24:19 -0800
commite066008b38ca9ace1b6de8dbbac8ed460640791d (patch)
tree1e5ea0c2ef3afd79199deced95570fe34240290b /net/ipv4/devinet.c
parentd276055c4e90a7278cd5167ba9755c9b214bcff7 (diff)
downloadlinux-e066008b38ca9ace1b6de8dbbac8ed460640791d.tar.gz
ipv4: Fix __ip_dev_find() to use ifa_local instead of ifa_address.
Reported-by: Stephen Hemminger <shemminger@vyatta.com>
Reported-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 90389281d97a..ff53860d1e56 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -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)
 {
-	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);
 	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)
 
 		if (!net_eq(dev_net(dev), net))
 			continue;
-		if (ifa->ifa_address == addr) {
+		if (ifa->ifa_local == addr) {
 			result = dev;
 			break;
 		}