diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-03 14:24:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-03 14:24:19 -0500 |
commit | e066008b38ca9ace1b6de8dbbac8ed460640791d (patch) | |
tree | 1e5ea0c2ef3afd79199deced95570fe34240290b | |
parent | d276055c4e90a7278cd5167ba9755c9b214bcff7 (diff) |
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>
-rw-r--r-- | net/ipv4/devinet.c | 4 |
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) | |||
111 | 111 | ||
112 | static void inet_hash_insert(struct net *net, struct in_ifaddr *ifa) | 112 | static void inet_hash_insert(struct net *net, struct in_ifaddr *ifa) |
113 | { | 113 | { |
114 | unsigned int hash = inet_addr_hash(net, ifa->ifa_address); | 114 | unsigned int hash = inet_addr_hash(net, ifa->ifa_local); |
115 | 115 | ||
116 | spin_lock(&inet_addr_hash_lock); | 116 | spin_lock(&inet_addr_hash_lock); |
117 | hlist_add_head_rcu(&ifa->hash, &inet_addr_lst[hash]); | 117 | 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 | 146 | ||
147 | if (!net_eq(dev_net(dev), net)) | 147 | if (!net_eq(dev_net(dev), net)) |
148 | continue; | 148 | continue; |
149 | if (ifa->ifa_address == addr) { | 149 | if (ifa->ifa_local == addr) { |
150 | result = dev; | 150 | result = dev; |
151 | break; | 151 | break; |
152 | } | 152 | } |