From: echken Date: Mon, 17 Mar 2025 03:43:19 +0000 (+0000) Subject: fix(vrrp): display vrrp version by default X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=aabe3c207974f018d6ebfcb11587a449622c2d8e;p=mirror%2Ffrr.git fix(vrrp): display vrrp version by default Make the VRRP version information always visible in the running configuration output, regardless of whether it's the default value (version 3) or not. When using frr-reload.py to apply configuration changes, VRRP instances were being unnecessarily reinitialized even when no actual configuration changes were made. This occurred because: The cli_show_vrrp function in vrrpd/vrrp_vty.c does not display the VRRP version in the show running-config output when it's the default value (version 3). Configuration files often explicitly specify vrrp X version 3 even though it's the default. When frr-reload.py compares the explicit configuration with the running configuration, it detects a difference and generates commands to remove and recreate the VRRP instance. This patch modifies the cli_show_vrrp function to unconditionally display the VRRP version, regardless of whether it's the default value or the show_defaults parameter is set. By making the version information explicit in all cases, we ensure consistent configuration comparison in frr-reload.py, preventing unnecessary VRRP reinitialization and associated network disruptions. Signed-off-by: echken --- diff --git a/vrrpd/vrrp_vty.c b/vrrpd/vrrp_vty.c index 59794d9297..22542d8f8b 100644 --- a/vrrpd/vrrp_vty.c +++ b/vrrpd/vrrp_vty.c @@ -66,8 +66,7 @@ void cli_show_vrrp(struct vty *vty, const struct lyd_node *dnode, bool show_defa const char *ver = yang_dnode_get_string(dnode, "version"); vty_out(vty, " vrrp %s", vrid); - if (show_defaults || !yang_dnode_is_default(dnode, "version")) - vty_out(vty, " version %s", ver); + vty_out(vty, " version %s", ver); vty_out(vty, "\n"); }