diff options
Diffstat (limited to 'ospf6d/ospf6_top.c')
| -rw-r--r-- | ospf6d/ospf6_top.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index e2db77d44b..825ce7a6fc 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -971,8 +971,13 @@ DEFUN (ospf6_distance, "OSPF6 Administrative distance\n") { VTY_DECLVAR_CONTEXT(ospf6, o); + uint8_t distance; - o->distance_all = atoi(argv[1]->arg); + distance = atoi(argv[1]->arg); + if (o->distance_all != distance) { + o->distance_all = distance; + ospf6_restart_spf(o); + } return CMD_SUCCESS; } @@ -986,8 +991,10 @@ DEFUN (no_ospf6_distance, { VTY_DECLVAR_CONTEXT(ospf6, o); - o->distance_all = 0; - + if (o->distance_all) { + o->distance_all = 0; + ospf6_restart_spf(o); + } return CMD_SUCCESS; } @@ -1237,7 +1244,7 @@ DEFUN (no_ospf6_stub_router_admin, } /* Restart OSPF SPF algorithm*/ -static void ospf6_restart_spf(struct ospf6 *ospf6) +void ospf6_restart_spf(struct ospf6 *ospf6) { ospf6_route_remove_all(ospf6->route_table); ospf6_route_remove_all(ospf6->brouter_table); |
