diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-06-05 02:34:44 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-06-07 16:39:13 -0400 |
commit | 42f811b8bcdf6695bf74de580b1daf53445e8949 (patch) | |
tree | c7c9dd321c63eb24c5d41488b47b7178c6c9b572 /net/ipv4/arp.c | |
parent | 8d76527e728d00d1cf9d5dd663caffb2dcf05ae6 (diff) |
[IPV4]: Convert IPv4 devconf to an array
This patch converts the ipv4_devconf config members (everything except
sysctl) to an array. This allows easier manipulation which will be
needed later on to provide better management of default config values.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/arp.c')
-rw-r--r-- | net/ipv4/arp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 7110779a0244..e00767e8ebd9 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -877,7 +877,7 @@ static int arp_process(struct sk_buff *skb) | |||
877 | 877 | ||
878 | n = __neigh_lookup(&arp_tbl, &sip, dev, 0); | 878 | n = __neigh_lookup(&arp_tbl, &sip, dev, 0); |
879 | 879 | ||
880 | if (ipv4_devconf.arp_accept) { | 880 | if (IPV4_DEVCONF_ALL(ARP_ACCEPT)) { |
881 | /* Unsolicited ARP is not accepted by default. | 881 | /* Unsolicited ARP is not accepted by default. |
882 | It is possible, that this option should be enabled for some | 882 | It is possible, that this option should be enabled for some |
883 | devices (strip is candidate) | 883 | devices (strip is candidate) |
@@ -987,11 +987,11 @@ static int arp_req_set(struct arpreq *r, struct net_device * dev) | |||
987 | return 0; | 987 | return 0; |
988 | } | 988 | } |
989 | if (dev == NULL) { | 989 | if (dev == NULL) { |
990 | ipv4_devconf.proxy_arp = 1; | 990 | IPV4_DEVCONF_ALL(PROXY_ARP) = 1; |
991 | return 0; | 991 | return 0; |
992 | } | 992 | } |
993 | if (__in_dev_get_rtnl(dev)) { | 993 | if (__in_dev_get_rtnl(dev)) { |
994 | __in_dev_get_rtnl(dev)->cnf.proxy_arp = 1; | 994 | IN_DEV_CONF_SET(__in_dev_get_rtnl(dev), PROXY_ARP, 1); |
995 | return 0; | 995 | return 0; |
996 | } | 996 | } |
997 | return -ENXIO; | 997 | return -ENXIO; |
@@ -1093,11 +1093,12 @@ static int arp_req_delete(struct arpreq *r, struct net_device * dev) | |||
1093 | return pneigh_delete(&arp_tbl, &ip, dev); | 1093 | return pneigh_delete(&arp_tbl, &ip, dev); |
1094 | if (mask == 0) { | 1094 | if (mask == 0) { |
1095 | if (dev == NULL) { | 1095 | if (dev == NULL) { |
1096 | ipv4_devconf.proxy_arp = 0; | 1096 | IPV4_DEVCONF_ALL(PROXY_ARP) = 0; |
1097 | return 0; | 1097 | return 0; |
1098 | } | 1098 | } |
1099 | if (__in_dev_get_rtnl(dev)) { | 1099 | if (__in_dev_get_rtnl(dev)) { |
1100 | __in_dev_get_rtnl(dev)->cnf.proxy_arp = 0; | 1100 | IN_DEV_CONF_SET(__in_dev_get_rtnl(dev), |
1101 | PROXY_ARP, 0); | ||
1101 | return 0; | 1102 | return 0; |
1102 | } | 1103 | } |
1103 | return -ENXIO; | 1104 | return -ENXIO; |