From: Donatas Abraitis Date: Tue, 7 Mar 2023 20:36:15 +0000 (+0200) Subject: bgpd: Check if the peer is configured as interface when checking NHT X-Git-Tag: base_9.0~317^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=e9ad26e53f0b307d73da6f3083851054a5734ce9;p=matthieu%2Ffrr.git 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 --- diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index 25b458a8e5..473c95071c 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -324,7 +324,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) {