diff options
author | Denis V. Lunev <den@openvz.org> | 2008-01-15 02:05:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:02:12 -0500 |
commit | 9bd85e32644d4d3744117b0a196ad4382f8acf35 (patch) | |
tree | d25bb624d799e787f9de589f317001ee8b2357aa /net/ipv4/devinet.c | |
parent | 06f0511df1b3b32fc8e0840514d4b207150f1fa7 (diff) |
[IPV4]: Remove extra argument from arp_ignore.
arp_ignore has two arguments: dev & in_dev. dev is used for
inet_confirm_addr calling only.
inet_confirm_addr, in turn, either gets in_dev from the device passed
or iterates over all network devices if the device passed is NULL. It
seems logical to directly pass in_dev into inet_confirm_addr.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 03db15b10309..dc1665a2b075 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -968,24 +968,19 @@ static __be32 confirm_addr_indev(struct in_device *in_dev, __be32 dst, | |||
968 | 968 | ||
969 | /* | 969 | /* |
970 | * Confirm that local IP address exists using wildcards: | 970 | * Confirm that local IP address exists using wildcards: |
971 | * - dev: only on this interface, 0=any interface | 971 | * - in_dev: only on this interface, 0=any interface |
972 | * - dst: only in the same subnet as dst, 0=any dst | 972 | * - dst: only in the same subnet as dst, 0=any dst |
973 | * - local: address, 0=autoselect the local address | 973 | * - local: address, 0=autoselect the local address |
974 | * - scope: maximum allowed scope value for the local address | 974 | * - scope: maximum allowed scope value for the local address |
975 | */ | 975 | */ |
976 | __be32 inet_confirm_addr(const struct net_device *dev, __be32 dst, __be32 local, int scope) | 976 | __be32 inet_confirm_addr(struct in_device *in_dev, |
977 | __be32 dst, __be32 local, int scope) | ||
977 | { | 978 | { |
978 | __be32 addr = 0; | 979 | __be32 addr = 0; |
979 | struct in_device *in_dev; | 980 | struct net_device *dev; |
980 | |||
981 | if (dev) { | ||
982 | rcu_read_lock(); | ||
983 | if ((in_dev = __in_dev_get_rcu(dev))) | ||
984 | addr = confirm_addr_indev(in_dev, dst, local, scope); | ||
985 | rcu_read_unlock(); | ||
986 | 981 | ||
987 | return addr; | 982 | if (in_dev != NULL) |
988 | } | 983 | return confirm_addr_indev(in_dev, dst, local, scope); |
989 | 984 | ||
990 | read_lock(&dev_base_lock); | 985 | read_lock(&dev_base_lock); |
991 | rcu_read_lock(); | 986 | rcu_read_lock(); |