-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bgpd, zebra, tests: disable rtadv when bgp instance unconfiguration. #18364
base: master
Are you sure you want to change the base?
bgpd, zebra, tests: disable rtadv when bgp instance unconfiguration. #18364
Conversation
If a peer uses radv for an interface, and bgp instance is removed, then the radv service is not disabled on the interface. Fix this by doing the same at BGP unconfiguration. Like it has been done when a peer is unconfigured, call the radv unregistration before deleting the peer. Fixes: b3a3290 ("bgpd: turn off RAs when numbered peers are deleted") Signed-off-by: Philippe Guibert <[email protected]> Signed-off-by: Dmytro Shytyi <[email protected]>
When configured Graceful-Restart, skipping unconfig notification, similarly as it is done in 95098d9 ("bgpd: Do not send Deconfig/Shutdown message when restarting") Signed-off-by: Dmytro Shytyi <[email protected]>
e44a909
to
2455780
Compare
Add to "show interface json" output multiple rtadv parameters. if_dump_vty() calls => hook_call(zebra_if_extra_info, vty, ifp); if_dump_vty_json() now do the same call, with additional parameter: hook_call(zebra_if_extra_info, vty, json_if, ifp); Signed-off-by: Dmytro Shytyi <[email protected]>
Verify the new rtadv "show interface json" fields Signed-off-by: Dmytro Shytyi <[email protected]>
2455780
to
92cd26e
Compare
ci:rerun |
#if defined(HAVE_RTADV) | ||
if (json_if && rtadv->AdvSendAdvertisements) { | ||
json_object_int_add(json_if, "ndAdvertisedReachableTimeMilliseconds", | ||
rtadv->AdvReachableTime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Msecs instead of Milliseconds (git grep Msecs on bgpd)
json_object_int_add(json_if, "ndAdvertisedReachableTimeMilliseconds", | ||
rtadv->AdvReachableTime); | ||
json_object_int_add(json_if, "ndAdvertisedRetransmitIntervalMilliseconds", | ||
rtadv->AdvRetransTimer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Msecs instead of Milliseconds
interval = rtadv->MaxRtrAdvInterval; | ||
if (interval % 1000) | ||
json_object_int_add(json_if, "ndRouterAdvertisementsIntervalMilliseconds", | ||
interval); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Msecs instead of Milliseconds
else | ||
json_object_int_add(json_if, "ndRouterAdvertisementsIntervalSeconds", | ||
interval / 1000); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secs instead of Seconds
"ndRouterAdvertisementsWithHomeAgentFlagBitSet", | ||
true); | ||
if (rtadv->HomeAgentLifetime != -1) | ||
json_object_int_add(json_if, "homeAgentLifetimeSeconds", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secs instead of Seconds
"homeAgentLifetimeTracksRaLifetime", true); | ||
|
||
json_object_int_add(json_if, "homeAgenttPreferenceIs", | ||
rtadv->HomeAgentLifetime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: homeAgentPreferenceIs
'homeAgentPreference' is enough
@@ -1792,6 +1792,65 @@ static int nd_dump_vty(struct vty *vty, struct interface *ifp) | |||
vty_out(vty, | |||
" ND router advertisements with Adv. Interval option.\n"); | |||
} | |||
|
|||
#if defined(HAVE_RTADV) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless define
|
||
if (rtadv->AdvHomeAgentFlag) { | ||
json_object_boolean_add(json_if, | ||
"ndRouterAdvertisementsWithHomeAgentFlagBitSet", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ndRouterAdvertisementsWithHomeAgentFlagBit is enough
|
||
if (rtadv->AdvDefaultLifetime != -1) | ||
json_object_int_add(json_if, "ndRouterAdvertisementsLiveForSeconds", | ||
rtadv->AdvDefaultLifetime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ndRouterAdvertisementsLiveForSecs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some changes need to be done
we appear to have 2 open commits from 6wind in relation to this exact problem. Which one is the one we should be lookiing at? |
I just closed #18328. |
If bgpd instance is removed, then the rtadv is not disabled.
Like it was done when a peer is unconfigured,
do the same at BGP unconfiguration: unregister rtadv before deleting a peer.
Add a rtadv json fields. Create a topotest to check that newly added json fields are present.