]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/arp.c
[IPV4] ARP: Alloc acceptance of unsolicited ARP via netdevice sysctl.
[linux-2.6-omap-h63xx.git] / net / ipv4 / arp.c
index accdefedfed72654eba15e642d87630ddb090d9b..041dadde31af74c23b482bb65905f2bba6822471 100644 (file)
@@ -879,16 +879,16 @@ static int arp_process(struct sk_buff *skb)
 
        n = __neigh_lookup(&arp_tbl, &sip, dev, 0);
 
-#ifdef CONFIG_IP_ACCEPT_UNSOLICITED_ARP
-       /* Unsolicited ARP is not accepted by default.
-          It is possible, that this option should be enabled for some
-          devices (strip is candidate)
-        */
-       if (n == NULL &&
-           arp->ar_op == htons(ARPOP_REPLY) &&
-           inet_addr_type(sip) == RTN_UNICAST)
-               n = __neigh_lookup(&arp_tbl, &sip, dev, -1);
-#endif
+       if (ipv4_devconf.arp_accept) {
+               /* Unsolicited ARP is not accepted by default.
+                  It is possible, that this option should be enabled for some
+                  devices (strip is candidate)
+                */
+               if (n == NULL &&
+                   arp->ar_op == htons(ARPOP_REPLY) &&
+                   inet_addr_type(sip) == RTN_UNICAST)
+                       n = __neigh_lookup(&arp_tbl, &sip, dev, -1);
+       }
 
        if (n) {
                int state = NUD_REACHABLE;