From: Alexander Chernavin Date: Fri, 2 Apr 2021 12:55:05 +0000 (-0400) Subject: ospfd: fix output of dead-interval in show running X-Git-Tag: base_8.0~151^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F8396%2Fhead;p=mirror%2Ffrr.git ospfd: fix output of dead-interval in show running When you set OSPF hello-interval for an interface and dead-interval is not set for this interface, dead-interval will be calculated and set automatically. "show running-config" will contain an invalid command: test(config)# interface vpp1 test(config-if)# ip ospf area 0 test(config-if)# ip ospf hello-interval 1 test(config-if)# exit test(config)# test(config)# do show running-config ... interface if1 ip ospf area 0 ip ospf dead-interval minimal hello-multiplier 0 ip ospf hello-interval 1 ! ... It causes frr-reload.py to fail because of this: # vtysh -c "show running-config no-header" | vtysh -m -f - line 9: % Unknown command: ip ospf dead-interval minimal hello-multiplier 0 ... With this change, output "ip ospf dead-interval" only if it has value configured explicitly. Signed-off-by: Alexander Chernavin --- diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index d7e8665489..791f9eb551 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -11708,6 +11708,7 @@ static int config_write_interface_one(struct vty *vty, struct vrf *vrf) /* Router Dead Interval print. */ if (OSPF_IF_PARAM_CONFIGURED(params, v_wait) + && params->is_v_wait_set && params->v_wait != OSPF_ROUTER_DEAD_INTERVAL_DEFAULT) { vty_out(vty, " ip ospf dead-interval ");