diff options
-rw-r--r-- | Documentation/networking/ip-sysctl.txt | 15 | ||||
-rw-r--r-- | net/ipv4/arp.c | 3 |
2 files changed, 14 insertions, 4 deletions
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index c532884f4fec..2dc7a1d97686 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -852,9 +852,18 @@ arp_notify - BOOLEAN | |||
852 | or hardware address changes. | 852 | or hardware address changes. |
853 | 853 | ||
854 | arp_accept - BOOLEAN | 854 | arp_accept - BOOLEAN |
855 | Define behavior when gratuitous arp replies are received: | 855 | Define behavior for gratuitous ARP frames who's IP is not |
856 | 0 - drop gratuitous arp frames | 856 | already present in the ARP table: |
857 | 1 - accept gratuitous arp frames | 857 | 0 - don't create new entries in the ARP table |
858 | 1 - create new entries in the ARP table | ||
859 | |||
860 | Both replies and requests type gratuitous arp will trigger the | ||
861 | ARP table to be updated, if this setting is on. | ||
862 | |||
863 | If the ARP table already contains the IP address of the | ||
864 | gratuitous arp frame, the arp table will be updated regardless | ||
865 | if this setting is on or off. | ||
866 | |||
858 | 867 | ||
859 | app_solicit - INTEGER | 868 | app_solicit - INTEGER |
860 | The maximum number of probes to send to the user space ARP daemon | 869 | The maximum number of probes to send to the user space ARP daemon |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 078709233bc4..1940b4df7699 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -907,7 +907,8 @@ static int arp_process(struct sk_buff *skb) | |||
907 | devices (strip is candidate) | 907 | devices (strip is candidate) |
908 | */ | 908 | */ |
909 | if (n == NULL && | 909 | if (n == NULL && |
910 | arp->ar_op == htons(ARPOP_REPLY) && | 910 | (arp->ar_op == htons(ARPOP_REPLY) || |
911 | (arp->ar_op == htons(ARPOP_REQUEST) && tip == sip)) && | ||
911 | inet_addr_type(net, sip) == RTN_UNICAST) | 912 | inet_addr_type(net, sip) == RTN_UNICAST) |
912 | n = __neigh_lookup(&arp_tbl, &sip, dev, 1); | 913 | n = __neigh_lookup(&arp_tbl, &sip, dev, 1); |
913 | } | 914 | } |