From 40dfd01525467bea154bff03d524ff12f7a650c5 Mon Sep 17 00:00:00 2001 From: hengwu0 <17380582683@163.com> Date: Mon, 25 Mar 2024 16:51:56 +0800 Subject: [PATCH] zebra: Always receive RS zebra: The socket is listening on ND_ROUTER_SOLICIT of icmpv6, but won't recv it when RA is disabled. It will let packets accumulate in kernel. We should always receive RS packets regardless of whether RA is disabled. --- zebra/rtadv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 6aca643bd8e2..b2a11569be32 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -1310,10 +1310,11 @@ void ipv6_nd_suppress_ra_set(struct interface *ifp, zif->rtadv.NumFastReXmitsRemain = RTADV_NUM_FAST_REXMITS; } - - rtadv_start_interface_events(zvrf, zif); } } + + /* Always receive RS, no matter RA is currently disabled */ + rtadv_start_interface_events(zvrf, zif); } void ipv6_nd_interval_set(struct interface *ifp, uint32_t interval) @@ -1771,8 +1772,7 @@ void rtadv_if_up(struct zebra_if *zif) * startup the state machine, if it hasn't been already * due to a delayed ifindex on startup ordering */ - if (zif->rtadv.AdvSendAdvertisements) - rtadv_start_interface_events(zvrf, zif); + rtadv_start_interface_events(zvrf, zif); } void rtadv_if_init(struct zebra_if *zif)