soreuseport: fix merge conflict in tcp bind
[cascardo/linux.git] / net / ipv4 / arp.c
index 59b3e0e..c102eb5 100644 (file)
@@ -735,6 +735,14 @@ static int arp_process(struct net *net, struct sock *sk, struct sk_buff *skb)
            (!IN_DEV_ROUTE_LOCALNET(in_dev) && ipv4_is_loopback(tip)))
                goto out;
 
+ /*
+  *    For some 802.11 wireless deployments (and possibly other networks),
+  *    there will be an ARP proxy and gratuitous ARP frames are attacks
+  *    and thus should not be accepted.
+  */
+       if (sip == tip && IN_DEV_ORCONF(in_dev, DROP_GRATUITOUS_ARP))
+               goto out;
+
 /*
  *     Special case: We must set Frame Relay source Q.922 address
  */