diff options
author | ckishimo <carles.kishimoto@gmail.com> | 2021-03-17 00:01:19 +0100 |
---|---|---|
committer | ckishimo <carles.kishimoto@gmail.com> | 2021-03-17 00:01:22 +0100 |
commit | d100d0b00c91af7ce38cc25139563201a1fbfb42 (patch) | |
tree | d22776f1566af5e4131b4c5fad0e3b5a2713b9ab /ospf6d/ospf6_interface.c | |
parent | ospf6d: fix iface commands lost when removing from area (diff) | |
download | frr-d100d0b00c91af7ce38cc25139563201a1fbfb42.tar.xz frr-d100d0b00c91af7ce38cc25139563201a1fbfb42.zip |
ospf6d: remove interface prefix when area is removed
This bug was first reported in PR#7717. When removing an interface
from the area, the interface prefix is still shown
r1# sh ipv6 ospf6 interface prefix
*N IA 2013:12::/64 ::1 r1-r2-eth0 00:00:12
r1# conf t
r1(config)# router ospf6
r1(config-ospf6)# no interface r1-r2-eth0 area 0.0.0.0
r1(config-ospf6)# exit
r1# sh ipv6 ospf6 interface prefix
*N IA 2013:12::/64 ::1 r1-r2-eth0 00:00:22
This fix will check if the interface is disabled so the
prefix is not shown
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
Diffstat (limited to 'ospf6d/ospf6_interface.c')
-rw-r--r-- | ospf6d/ospf6_interface.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index a5d913874..f1226edfa 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -1449,6 +1449,12 @@ DEFUN (show_ipv6_ospf6_interface_ifname_prefix, return CMD_WARNING; } + if (CHECK_FLAG(oi->flag, OSPF6_INTERFACE_DISABLE)) { + vty_out(vty, "Interface %s not attached to area\n", + argv[idx_ifname]->arg); + return CMD_WARNING; + } + ospf6_route_table_show(vty, idx_prefix, argc, argv, oi->route_connected, uj); @@ -1482,7 +1488,7 @@ DEFUN (show_ipv6_ospf6_interface_prefix, FOR_ALL_INTERFACES (vrf, ifp) { oi = (struct ospf6_interface *)ifp->info; - if (oi == NULL) + if (oi == NULL || CHECK_FLAG(oi->flag, OSPF6_INTERFACE_DISABLE)) continue; ospf6_route_table_show(vty, idx_prefix, argc, argv, |