summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ospfd/ospf_vty.c5
-rw-r--r--ospfd/ospfd.c7
-rw-r--r--ospfd/ospfd.h3
3 files changed, 14 insertions, 1 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 97c8e8d6..a8807141 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -7020,6 +7020,10 @@ DEFUN (ospf_max_metric_router_lsa_admin,
if (!CHECK_FLAG (area->stub_router_state, OSPF_AREA_IS_STUB_ROUTED))
ospf_router_lsa_update_area (area);
}
+
+ /* Allows for areas configured later to get the property */
+ ospf->stub_router_admin_set = OSPF_STUB_ROUTER_ADMINISTRATIVE_SET;
+
return CMD_SUCCESS;
}
@@ -7047,6 +7051,7 @@ DEFUN (no_ospf_max_metric_router_lsa_admin,
ospf_router_lsa_update_area (area);
}
}
+ ospf->stub_router_admin_set = OSPF_STUB_ROUTER_ADMINISTRATIVE_UNSET;
return CMD_SUCCESS;
}
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index e8405136..11a2dc5c 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -182,7 +182,8 @@ ospf_new (void)
new->stub_router_startup_time = OSPF_STUB_ROUTER_UNCONFIGURED;
new->stub_router_shutdown_time = OSPF_STUB_ROUTER_UNCONFIGURED;
-
+ new->stub_router_admin_set = OSPF_STUB_ROUTER_ADMINISTRATIVE_UNSET;
+
/* Distribute parameter init. */
for (i = 0; i <= ZEBRA_ROUTE_MAX; i++)
{
@@ -676,6 +677,10 @@ ospf_area_get (struct ospf *ospf, struct in_addr area_id, int format)
area->format = format;
listnode_add_sort (ospf->areas, area);
ospf_check_abr_status (ospf);
+ if (ospf->stub_router_admin_set == OSPF_STUB_ROUTER_ADMINISTRATIVE_SET)
+ {
+ SET_FLAG (area->stub_router_state, OSPF_AREA_ADMIN_STUB_ROUTED);
+ }
}
return area;
diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h
index bf825d17..dfaef1d4 100644
--- a/ospfd/ospfd.h
+++ b/ospfd/ospfd.h
@@ -195,6 +195,9 @@ struct ospf
unsigned int stub_router_startup_time; /* seconds */
unsigned int stub_router_shutdown_time; /* seconds */
#define OSPF_STUB_ROUTER_UNCONFIGURED 0
+ u_char stub_router_admin_set;
+#define OSPF_STUB_ROUTER_ADMINISTRATIVE_SET 1
+#define OSPF_STUB_ROUTER_ADMINISTRATIVE_UNSET 0
#define OSPF_STUB_MAX_METRIC_SUMMARY_COST 0x00ff0000