]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospfd: fix missing max-metric in show running config
authoranlan_cs <vic.lan@pica8.com>
Tue, 25 Oct 2022 06:48:06 +0000 (02:48 -0400)
committeranlan_cs <vic.lan@pica8.com>
Wed, 26 Oct 2022 12:50:17 +0000 (08:50 -0400)
```
(ospf)  max-metric router-lsa administrative
```

Currently this running config depends at least one `area` with *active*
`network`, otherwise it will not occur.

The check on this dependency is redundant and wrong, just remove it.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
ospfd/ospf_vty.c

index 4f0fa6194acfb6f86eccbf1caea64893f44e305f..76dbc94c16461079defa6b948aef5b4292ce1f8f 100644 (file)
@@ -10532,22 +10532,15 @@ DEFUN (no_ospf_route_aggregation_timer,
 
 static void config_write_stub_router(struct vty *vty, struct ospf *ospf)
 {
-       struct listnode *ln;
-       struct ospf_area *area;
-
        if (ospf->stub_router_startup_time != OSPF_STUB_ROUTER_UNCONFIGURED)
                vty_out(vty, " max-metric router-lsa on-startup %u\n",
                        ospf->stub_router_startup_time);
        if (ospf->stub_router_shutdown_time != OSPF_STUB_ROUTER_UNCONFIGURED)
                vty_out(vty, " max-metric router-lsa on-shutdown %u\n",
                        ospf->stub_router_shutdown_time);
-       for (ALL_LIST_ELEMENTS_RO(ospf->areas, ln, area)) {
-               if (CHECK_FLAG(area->stub_router_state,
-                              OSPF_AREA_ADMIN_STUB_ROUTED)) {
-                       vty_out(vty, " max-metric router-lsa administrative\n");
-                       break;
-               }
-       }
+       if (ospf->stub_router_admin_set == OSPF_STUB_ROUTER_ADMINISTRATIVE_SET)
+               vty_out(vty, " max-metric router-lsa administrative\n");
+
        return;
 }