OSDN Git Service

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)
commite68c5dcf0aacc48a23cedcb3ce81b8c60837f48c
treec89fddb75cef6e3d2e2159417e6e4ab9492a03ca
parent459f326e995ce6f02f3dc79ca5bc4e2abe33d156
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