summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_interface.c')
-rw-r--r--ospf6d/ospf6_interface.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index 621cc36a0c..158b8dc483 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -45,11 +45,12 @@
#include "ospf6_zebra.h"
#include "lib/json.h"
-DEFINE_MTYPE_STATIC(OSPF6D, CFG_PLIST_NAME, "configured prefix list names")
-DEFINE_QOBJ_TYPE(ospf6_interface)
+DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_IF, "OSPF6 interface");
+DEFINE_MTYPE_STATIC(OSPF6D, CFG_PLIST_NAME, "configured prefix list names");
+DEFINE_QOBJ_TYPE(ospf6_interface);
DEFINE_HOOK(ospf6_interface_change,
(struct ospf6_interface * oi, int state, int old_state),
- (oi, state, old_state))
+ (oi, state, old_state));
unsigned char conf_debug_ospf6_interface = 0;
@@ -1449,6 +1450,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 +1489,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,
@@ -1622,12 +1629,11 @@ DEFUN (ipv6_ospf6_cost,
return CMD_WARNING_CONFIG_FAILED;
}
+ SET_FLAG(oi->flag, OSPF6_INTERFACE_NOAUTOCOST);
if (oi->cost == lcost)
return CMD_SUCCESS;
oi->cost = lcost;
- SET_FLAG(oi->flag, OSPF6_INTERFACE_NOAUTOCOST);
-
ospf6_interface_force_recalculate_cost(oi);
return CMD_SUCCESS;