Merge pull request #15840 from opensourcerouting/ospf6-iftype-connected-fix

ospf6d: fix interface type vs. connected routes updates
This commit is contained in:
Donald Sharp 2024-05-02 10:22:11 -04:00 committed by GitHub
commit 54ea38819f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -455,9 +455,9 @@ void ospf6_interface_connected_route_update(struct interface *ifp)
} }
} }
if (oi->state == OSPF6_INTERFACE_LOOPBACK || if (oi->type == OSPF_IFTYPE_LOOPBACK ||
oi->state == OSPF6_INTERFACE_POINTTOMULTIPOINT || oi->type == OSPF_IFTYPE_POINTOMULTIPOINT ||
oi->state == OSPF6_INTERFACE_POINTTOPOINT) { oi->type == OSPF_IFTYPE_POINTOPOINT) {
struct ospf6_route *la_route; struct ospf6_route *la_route;
la_route = ospf6_route_create(oi->area->ospf6); 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); 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) !oi->p2xp_connected_pfx_include)
continue; continue;
if (oi->state == OSPF6_INTERFACE_POINTTOPOINT && if (oi->type == OSPF_IFTYPE_POINTOPOINT &&
oi->p2xp_connected_pfx_exclude) oi->p2xp_connected_pfx_exclude)
continue; continue;
@ -792,8 +792,8 @@ void interface_up(struct event *thread)
return; return;
} }
/* Recompute cost */ /* Recompute cost & update connected LSAs */
ospf6_interface_recalculate_cost(oi); ospf6_interface_force_recalculate_cost(oi);
/* if already enabled, do nothing */ /* if already enabled, do nothing */
if (oi->state > OSPF6_INTERFACE_DOWN) { if (oi->state > OSPF6_INTERFACE_DOWN) {
@ -2644,13 +2644,14 @@ DEFUN (ipv6_ospf6_network,
DEFUN (no_ipv6_ospf6_network, DEFUN (no_ipv6_ospf6_network,
no_ipv6_ospf6_network_cmd, no_ipv6_ospf6_network_cmd,
"no ipv6 ospf6 network [<broadcast|point-to-point>]", "no ipv6 ospf6 network [<broadcast|point-to-point|point-to-multipoint>]",
NO_STR NO_STR
IP6_STR IP6_STR
OSPF6_STR OSPF6_STR
"Set default network type\n" "Set default network type\n"
"Specify OSPF6 broadcast network\n" "Specify OSPF6 broadcast network\n"
"Specify OSPF6 point-to-point network\n") "Specify OSPF6 point-to-point network\n"
"Specify OSPF6 point-to-multipoint network\n")
{ {
VTY_DECLVAR_CONTEXT(interface, ifp); VTY_DECLVAR_CONTEXT(interface, ifp);
struct ospf6_interface *oi; struct ospf6_interface *oi;