ip ntable: Add support for "mcast_reprobes" parameter
Subsystems (2)
PATCH 1/1 ip ntable: Add support for "mcast_reprobes" parameter
Kernel commit 8da86466b837 ("net: neighbour: Add mcast_resolicit to configure the number of multicast resolicitations in PROBE state.") added the "NDTPA_MCAST_REPROBES" netlink attribute that allows user space to set / get the number of multicast probes that are sent by the kernel in PROBE state after unicast probes did not solicit a response.
Add support for this parameter in iproute2.
Example usage and output:
$ ip ntable show dev dummy0 name arp_cache
inet arp_cache
dev dummy0
refcnt 1 reachable 43430 base_reachable 30000 retrans 1000
gc_stale 60000 delay_probe 5000 queue 101
app_probes 0 ucast_probes 3 mcast_probes 3 mcast_reprobes 0
anycast_delay 1000 proxy_delay 800 proxy_queue 64 locktime 1000 # ip ntable change name arp_cache dev dummy0 mcast_reprobes 5
$ ip ntable show dev dummy0 name arp_cache
inet arp_cache
dev dummy0
refcnt 1 reachable 43430 base_reachable 30000 retrans 1000
gc_stale 60000 delay_probe 5000 queue 101
app_probes 0 ucast_probes 3 mcast_probes 3 mcast_reprobes 5
anycast_delay 1000 proxy_delay 800 proxy_queue 64 locktime 1000 $ ip -j -p ntable show dev dummy0 name arp_cache
[ {
"family": "inet",
"name": "arp_cache",
"dev": "dummy0",
"refcnt": 1,
"reachable": 43430,
"base_reachable": 30000,
"retrans": 1000,
"gc_stale": 60000,
"delay_probe": 5000,
"queue": 101,
"app_probes": 0,
"ucast_probes": 3,
"mcast_probes": 3,
"mcast_reprobes": 5,
"anycast_delay": 1000,
"proxy_delay": 800,
"proxy_queue": 64,
"locktime": 1000
} ]--- ip/ipntable.c | 21 ++++++++++++++++++++- man/man8/ip-ntable.8 | 2 ++ 2 files changed, 22 insertions(+), 1 deletion(-)
ip/ipntable.c +20 -1
@@ -40,7 +40,8 @@ static void usage(void)"PARMS := [ base_reachable MSEC ] [ retrans MSEC ] [ gc_stale MSEC ]\n" " [ delay_probe MSEC ] [ queue LEN ]\n" " [ app_probes VAL ] [ ucast_probes VAL ] [ mcast_probes VAL ]\n" -" [ anycast_delay MSEC ] [ proxy_delay MSEC ] [ proxy_queue LEN ]\n" +" [ mcast_reprobes VAL ] [ anycast_delay MSEC ]\n" +" [ proxy_delay MSEC ] [ proxy_queue LEN ]\n" " [ locktime MSEC ]\n" );
@@ -223,6 +224,17 @@ static int ipntable_modify(int cmd, int flags, int argc, char **argv)rta_addattr32 (parms_rta,sizeof (parms_buf),NDTPA_MCAST_PROBES , mprobe); parms_change =1 ; + }else if (strcmp (*argv,"mcast_reprobes" ) ==0 ) { +__u32 mreprobe; + +NEXT_ARG (); + +if (get_u32 (&mreprobe, *argv,0 )) +invarg ("\"mcast_reprobes\" value is invalid" , *argv); + +rta_addattr32 (parms_rta,sizeof (parms_buf), +NDTPA_MCAST_REPROBES , mreprobe); + parms_change =1 ; }else if (strcmp (*argv,"anycast_delay" ) ==0 ) {__u64 anycast_delay;
@@ -440,6 +452,13 @@ static void print_ndtparams(struct rtattr *tpb[]) "mcast_probes %u ", mprobe); } +if (tpb[NDTPA_MCAST_REPROBES ]) { +__u32 mreprobe =rta_getattr_u32 (tpb[NDTPA_MCAST_REPROBES ]); + +print_uint (PRINT_ANY ,"mcast_reprobes" , +"mcast_reprobes %u " , mreprobe); + } +print_string (PRINT_FP ,NULL ,"%s " , _SL_);if (tpb[NDTPA_ANYCAST_DELAY ]) {
man/man8/ip-ntable.8 +2 -0
@@ -42,6 +42,8 @@ ip-ntable - neighbour table configuration .IR VAL " ] [" .B mcast_probes .IR VAL " ] [" +.B mcast_reprobes +.IR VAL " ] [" .B anycast_delay .IR MSEC " ] [" .B proxy_delay
Signature · 1 line
2.49.0
This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:
Hello:
This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:
Quoted 9 lines · On Thu, 8 May 2025 14:13:01 +0300 you wrote:
Kernel commit
8da86466b837("net: neighbour: Addmcast_resolicitto configure the number of multicast resolicitations in PROBE state.") added the "NDTPA_MCAST_REPROBES" netlink attribute that allows user space to set / get the number of multicast probes that are sent by the kernel in PROBE state after unicast probes did not solicit a response.Add support for this parameter in iproute2.
[...]
Here is the summary with links:
- [iproute2-next] ip ntable: Add support for "mcast_reprobes" parameter
https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=f98940cce003
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html