summaryrefslogtreecommitdiffstats
path: root/ospfd/ospfd.c
diff options
context:
space:
mode:
authorAyan Banerjee <ayan@cumulusnetworks.com>2012-12-03 20:17:24 +0100
committerScott Feldman <sfeldma@cumulusnetworks.com>2013-01-07 18:59:41 +0100
commit4ba4fc857685bfe31c7127826652012a750367c5 (patch)
treed7f07b950c43907d9c8c07dc4423bc008c01174a /ospfd/ospfd.c
parentospf: suppress delete using replacement (diff)
downloadfrr-4ba4fc857685bfe31c7127826652012a750367c5.tar.xz
frr-4ba4fc857685bfe31c7127826652012a750367c5.zip
ospf: forward ref. of areas for "max-metric router-lsa administrative" cmd
In the event areas are created at a later point of time with respect to the playback of the "max-metric router-lsa administrative" command, those areas do not get into indefinite max-metric mode. This patch is inteneded to store the configuration and apply it to all future areas that may be created. In the process, some other bugs that were there with respect to restart etc are fixed up. Tested locally to see that the fix works across multiple areas and across multiple restarts. Signed-off-by: Ayan Banerjee <ayan@cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com> Reviewed-by: JR Rivers <jrrivers@cumulusnetworks.com> Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r--ospfd/ospfd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index e84051367..11a2dc5c1 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;