From a5c72eac139158904a62fb042682b24080fd8a4a Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 25 Apr 2024 12:16:35 +0200 Subject: [PATCH] ospf6d: fix loopback/ptp/ptmp conn. route checks The code emitting connected routes was checking against the interface state (which can also be lo/ptp/ptmp) rather than the interface type. This was causing wrong IA prefixes for connected routes getting put up out if the interface was down intermittently. Signed-off-by: David Lamparter (cherry picked from commit 4aa200c7c55c84033a804d7c37847790c936e256) --- ospf6d/ospf6_interface.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index a4f4e8fcab..c9ba5a81f7 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -455,9 +455,9 @@ void ospf6_interface_connected_route_update(struct interface *ifp) } } - if (oi->state == OSPF6_INTERFACE_LOOPBACK || - oi->state == OSPF6_INTERFACE_POINTTOMULTIPOINT || - oi->state == OSPF6_INTERFACE_POINTTOPOINT) { + if (oi->type == OSPF_IFTYPE_LOOPBACK || + oi->type == OSPF_IFTYPE_POINTOMULTIPOINT || + oi->type == OSPF_IFTYPE_POINTOPOINT) { struct ospf6_route *la_route; la_route = ospf6_route_create(oi->area->ospf6); @@ -475,10 +475,10 @@ void ospf6_interface_connected_route_update(struct interface *ifp) ospf6_route_add(la_route, oi->route_connected); } - if (oi->state == OSPF6_INTERFACE_POINTTOMULTIPOINT && + if (oi->type == OSPF_IFTYPE_POINTOMULTIPOINT && !oi->p2xp_connected_pfx_include) continue; - if (oi->state == OSPF6_INTERFACE_POINTTOPOINT && + if (oi->type == OSPF_IFTYPE_POINTOPOINT && oi->p2xp_connected_pfx_exclude) continue; -- 2.39.5