summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2021-06-10 11:30:05 +0200
committerLouis Scalbert <louis.scalbert@6wind.com>2021-07-01 14:40:14 +0200
commitc54fb080a054524dbcb0a03a73c2905c8558ddc9 (patch)
treee394fede11517584d1a2eaf7dff785000b2171b0
parent6794884231cc9a83b936323009370c3e1deff643 (diff)
ospf6d: reset areas and redistribution at router-id modification
The ospf6 router-id is provided by order of preference by: ospf6d itself if the "ospf6 router-id X.X.X.X" command is set. - zebra. If the "ip router-id X.X.X.X" zebra command is set, the configured IP is provided as the ID or alternatively the highest loopback IPv4 address or else the highest interface IPv4 address. The running ospf6 router-id is stored in ospf6->router-id. ospf6->router-id can change in the following conditions: - A configuration change provides a new router-id value according to the above rules. ospf6->router-id is updated to the new value if there is no adjacency in FULL state. Otherwise, the ospf6d process must be restarted to take the new router-id into account. - On startup of both zebra and ospf6d, if ospf6d has not yet received a valid router-id, ospf6d->router-id is set to 0 (i.e. 0.0.0.0). Then, zebra notifies ospf6d that the router-id is available. At ospf6->router-id, the current behavior of ospf6d is the following: - The self generated LSAs that refer to the previous router-id as the advertising router are kept. - Self generated LSAs are created with router-id value. - LSAs from the redistribution that refer to the previous router-id are kept and no new redistribution LSAs are created. As a consequence, the routers in the ospf6 areas will get incorrect LSAs and might not be able to install prefixes of those LSAs into their RIB. This fix solves this issue by resetting the areas and the redistribution when ospf6->router-id updated. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
-rw-r--r--ospf6d/ospf6_top.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index f18eea2129..d4557e0ef6 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -73,6 +73,8 @@ struct ospf6_master *om6;
static void ospf6_disable(struct ospf6 *o);
+static void ospf6_process_reset(struct ospf6 *ospf6);
+
static void ospf6_add(struct ospf6 *ospf6)
{
listnode_add(om6->ospf6, ospf6);
@@ -628,6 +630,9 @@ void ospf6_router_id_update(struct ospf6 *ospf6, bool init, struct vty *vty)
}
ospf6->router_id = new_router_id;
+
+ if (!init)
+ ospf6_process_reset(ospf6);
}
/* start ospf6 */