diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2013-12-10 09:02:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-11 14:47:40 -0500 |
commit | b601fa197fff265bf60eaf6950d4c194da080f4a (patch) | |
tree | 5a4fe90c1aa07be39a0720e2149b0cf7d95262bd /drivers/net/bonding/bonding.h | |
parent | 95ab09917a8187a02b518e22587c7f035edc7465 (diff) |
ipv4: fix wildcard search with inet_confirm_addr()
Help of this function says: "in_dev: only on this interface, 0=any interface",
but since commit 39a6d0630012 ("[NETNS]: Process inet_confirm_addr in the
correct namespace."), the code supposes that it will never be NULL. This
function is never called with in_dev == NULL, but it's exported and may be used
by an external module.
Because this patch restore the ability to call inet_confirm_addr() with in_dev
== NULL, I partially revert the above commit, as suggested by Julian.
CC: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bonding.h')
-rw-r--r-- | drivers/net/bonding/bonding.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index a9f4f9f4d8ce..a74c92c83ead 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -394,8 +394,8 @@ static inline __be32 bond_confirm_addr(struct net_device *dev, __be32 dst, __be3 | |||
394 | in_dev = __in_dev_get_rcu(dev); | 394 | in_dev = __in_dev_get_rcu(dev); |
395 | 395 | ||
396 | if (in_dev) | 396 | if (in_dev) |
397 | addr = inet_confirm_addr(in_dev, dst, local, RT_SCOPE_HOST); | 397 | addr = inet_confirm_addr(dev_net(dev), in_dev, dst, local, |
398 | 398 | RT_SCOPE_HOST); | |
399 | rcu_read_unlock(); | 399 | rcu_read_unlock(); |
400 | return addr; | 400 | return addr; |
401 | } | 401 | } |