]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipv4: new arp_accept option to accept garp only if in-network
authorJaehee Park <jhpark1013@gmail.com>
Wed, 13 Jul 2022 23:40:47 +0000 (16:40 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 16 Jul 2022 01:55:49 +0000 (18:55 -0700)
commit91c9ba7035531e87006e1bf38d477d95e3dcd7ce
treec89fddb75cef6e3d2e2159417e6e4ab9492a03ca
parent32b0501846360b7ebb844e7655e3e7cf78532abd
net: ipv4: new arp_accept option to accept garp only if in-network

In many deployments, we want the option to not learn a neighbor from
garp if the src ip is not in the same subnet as an address configured
on the interface that received the garp message. net.ipv4.arp_accept
sysctl is currently used to control creation of a neigh from a
received garp packet. This patch adds a new option '2' to
net.ipv4.arp_accept which extends option '1' by including the subnet
check.

Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
Suggested-by: Roopa Prabhu <roopa@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/networking/ip-sysctl.rst
include/linux/inetdevice.h
net/ipv4/arp.c