From 3704fee75d4b63ed3044a691bc26b0ec01fa329d Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Tue, 7 Mar 2023 22:36:15 +0200 Subject: [PATCH] bgpd: Check if the peer is configured as interface when checking NHT This causes early return. peer->conf is NULL for IPv6 link-local peering, and the session never establish. Signed-off-by: Donatas Abraitis (cherry picked from commit e9ad26e53f0b307d73da6f3083851054a5734ce9) --- bgpd/bgp_nht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index cf8ff524e9..24e47940a2 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -339,7 +339,7 @@ int bgp_find_or_add_nexthop(struct bgp *bgp_route, struct bgp *bgp_nexthop, * Gather the ifindex for if up/down events to be * tagged into this fun */ - if (afi == AFI_IP6 && + if (afi == AFI_IP6 && peer->conf_if && IN6_IS_ADDR_LINKLOCAL(&peer->su.sin6.sin6_addr)) { ifindex = peer->su.sin6.sin6_scope_id; if (ifindex == 0) { -- 2.39.5