summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ospf6d/ospf6_interface.c8
-rw-r--r--ospf6d/ospf6_top.c4
-rw-r--r--tests/topotests/lib/ospf.py9
3 files changed, 13 insertions, 8 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index a5d9138743..f1226edfa7 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,
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index 3f72ec828e..efa4bfb420 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -809,7 +809,8 @@ DEFUN (no_ospf6_interface_area,
/* Verify Area */
if (oi->area == NULL) {
- vty_out(vty, "No such Area-ID: %s\n", argv[idx_ipv4]->arg);
+ vty_out(vty, "%s not attached to area %s\n",
+ oi->interface->name, oi->area->name);
return CMD_SUCCESS;
}
@@ -830,7 +831,6 @@ DEFUN (no_ospf6_interface_area,
UNSET_FLAG(oa->flag, OSPF6_AREA_ENABLE);
ospf6_abr_disable_area(oa);
}
- ospf6_interface_delete(oi);
return CMD_SUCCESS;
}
diff --git a/tests/topotests/lib/ospf.py b/tests/topotests/lib/ospf.py
index 79e4d97448..9f642411b5 100644
--- a/tests/topotests/lib/ospf.py
+++ b/tests/topotests/lib/ospf.py
@@ -344,10 +344,9 @@ def config_ospf_interface(tgen, topo, input_dict=None, build=False, load_config=
for lnk in input_dict[router]["links"].keys():
if "ospf" not in input_dict[router]["links"][lnk]:
logger.debug(
- "Router %s: ospf configs is not present in"
- "input_dict, passed input_dict",
- router,
- input_dict,
+ "Router %s: ospf config is not present in"
+ "input_dict",
+ router
)
continue
ospf_data = input_dict[router]["links"][lnk]["ospf"]
@@ -724,7 +723,7 @@ def verify_ospf6_neighbor(tgen, topo):
nh_state = neighbor["state"]
break
else:
- return "[DUT: {}] OSPF6 peer {} missing".format(router, data_rid)
+ return "[DUT: {}] OSPF6 peer {} missing".format(router, ospf_nbr_rid)
if nh_state == "Full":
no_of_peer += 1