From 561ad925e9f48be9e0c71540ce8a83cfe602ab56 Mon Sep 17 00:00:00 2001 From: Alexander Rose Date: Fri, 1 Mar 2024 13:02:02 +0100 Subject: [PATCH] ospfd: Send update for route with new metric When an AS-external-route is deleted on our system and later added again with a new metric, then the ospfd would first send a LS-update to remove the old route and later another LS-update to add the route with the new metric again. But when this metric-change happens with no time inbetween the ospfd recognizes this as the same route and does not send any LS-update. With the change made here, the ospfd will interpret this route as a different route, when the metric has changed. Signed-off-by: Alexander Rose --- ospfd/ospf_asbr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ospfd/ospf_asbr.c b/ospfd/ospf_asbr.c index 5baad1754d5a..9b62f36d7a6c 100644 --- a/ospfd/ospf_asbr.c +++ b/ospfd/ospf_asbr.c @@ -110,7 +110,8 @@ ospf_external_info_add(struct ospf *ospf, uint8_t type, unsigned short instance, new = rn->info; if ((new->ifindex == ifindex) && (new->nexthop.s_addr == nexthop.s_addr) - && (new->tag == tag)) { + && (new->tag == tag) + && (new->metric == metric)) { route_unlock_node(rn); return NULL; /* NULL => no LSA to refresh */ }