]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ip neigh: Add support for "extern_valid" flag
authorIdo Schimmel <idosch@nvidia.com>
Tue, 1 Jul 2025 14:42:16 +0000 (17:42 +0300)
committerDavid Ahern <dsahern@kernel.org>
Wed, 2 Jul 2025 14:50:11 +0000 (14:50 +0000)
commit1ac42adcb600bbbbe94ee43a4fcc8f3061817600
treee03b02d50e4b30ab5e714d56a839b88e6fe9826f
parenta207a61651659d303e68e4a3e220cf6306404d00
ip neigh: Add support for "extern_valid" flag

Add support for the recently added "extern_valid" flag that can be used
to indicate to the kernel that a neighbor entry was learned and
determined to be valid externally. The kernel will not remove or
invalidate the entry, but it can probe the entry and notify user space
when the entry becomes reachable. The kernel will return the entry to
stale state if it did not receive a confirmation after probing the
entry.

Example usage and output:

 # ip neigh add 192.0.2.1 nud none dev br0.10 extern_valid
 Error: Cannot create externally validated neighbor with an invalid state.
 # ip neigh add 192.0.2.1 lladdr 00:11:22:33:44:55 nud stale dev br0.10 extern_valid
 $ ip neigh show dev br0.10
 192.0.2.1 lladdr 00:11:22:33:44:55 extern_valid STALE
 $ ip -j -p neigh show dev br0.10
 [ {
         "dst": "192.0.2.1",
         "lladdr": "00:11:22:33:44:55",
         "extern_valid": null,
         "state": [ "STALE" ]
     } ]

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
ip/ipneigh.c
man/man8/ip-neighbour.8