summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_interface.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2024-04-25 12:16:35 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2024-04-25 12:16:35 +0200
commit4aa200c7c55c84033a804d7c37847790c936e256 (patch)
treee1d946307dea0ce52b3e75aab194f4b233ca1f32 /ospf6d/ospf6_interface.c
parentb47657600b4f6975aaaadf860b233d432d325d38 (diff)
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 <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_interface.c')
-rw-r--r--ospf6d/ospf6_interface.c10
1 files 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;