]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospf6d: fix loopback/ptp/ptmp conn. route checks
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 25 Apr 2024 10:16:35 +0000 (12:16 +0200)
committerton31337 <3352707+ton31337@users.noreply.github.com>
Sat, 4 May 2024 14:07:55 +0000 (14:07 +0000)
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 <equinox@opensourcerouting.org>
(cherry picked from commit 4aa200c7c55c84033a804d7c37847790c936e256)

ospf6d/ospf6_interface.c

index a4f4e8fcab03dfef7585e3bdc713178982b2d432..c9ba5a81f7e2990ecbc0de7e5de0aa772889565e 100644 (file)
@@ -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;