aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorNeil Horman <nhorman@tuxdriver.com>2006-03-21 01:39:47 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-21 01:39:47 -0500
commitabd596a4b68b6526c2676233e10602dd9660e9d7 (patch)
tree4122bd7fc36c18ffb762ea8ae6d5c794c1924222 /net
parent59f1741e541bf4f6139599389610a70de49c3ad2 (diff)
[IPV4] ARP: Alloc acceptance of unsolicited ARP via netdevice sysctl.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/arp.c20
-rw-r--r--net/ipv4/devinet.c8
2 files changed, 18 insertions, 10 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index accdefedfed7..041dadde31af 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -879,16 +879,16 @@ static int arp_process(struct sk_buff *skb)
879 879
880 n = __neigh_lookup(&arp_tbl, &sip, dev, 0); 880 n = __neigh_lookup(&arp_tbl, &sip, dev, 0);
881 881
882#ifdef CONFIG_IP_ACCEPT_UNSOLICITED_ARP 882 if (ipv4_devconf.arp_accept) {
883 /* Unsolicited ARP is not accepted by default. 883 /* Unsolicited ARP is not accepted by default.
884 It is possible, that this option should be enabled for some 884 It is possible, that this option should be enabled for some
885 devices (strip is candidate) 885 devices (strip is candidate)
886 */ 886 */
887 if (n == NULL && 887 if (n == NULL &&
888 arp->ar_op == htons(ARPOP_REPLY) && 888 arp->ar_op == htons(ARPOP_REPLY) &&
889 inet_addr_type(sip) == RTN_UNICAST) 889 inet_addr_type(sip) == RTN_UNICAST)
890 n = __neigh_lookup(&arp_tbl, &sip, dev, -1); 890 n = __neigh_lookup(&arp_tbl, &sip, dev, -1);
891#endif 891 }
892 892
893 if (n) { 893 if (n) {
894 int state = NUD_REACHABLE; 894 int state = NUD_REACHABLE;
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 3ffa60dadc0c..44fdf1413e2c 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1394,6 +1394,14 @@ static struct devinet_sysctl_table {
1394 .proc_handler = &proc_dointvec, 1394 .proc_handler = &proc_dointvec,
1395 }, 1395 },
1396 { 1396 {
1397 .ctl_name = NET_IPV4_CONF_ARP_ACCEPT,
1398 .procname = "arp_accept",
1399 .data = &ipv4_devconf.arp_accept,
1400 .maxlen = sizeof(int),
1401 .mode = 0644,
1402 .proc_handler = &proc_dointvec,
1403 },
1404 {
1397 .ctl_name = NET_IPV4_CONF_NOXFRM, 1405 .ctl_name = NET_IPV4_CONF_NOXFRM,
1398 .procname = "disable_xfrm", 1406 .procname = "disable_xfrm",
1399 .data = &ipv4_devconf.no_xfrm, 1407 .data = &ipv4_devconf.no_xfrm,