]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Check if the peer is configured as interface when checking NHT
authorDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 7 Mar 2023 20:36:15 +0000 (22:36 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 7 Mar 2023 20:36:15 +0000 (22:36 +0200)
This causes early return. peer->conf is NULL for IPv6 link-local peering,
and the session never establish.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_nht.c

index 25b458a8e5e56c83c4faaf3a9c22b1e3017882a4..473c95071c3423eaa80a45db86ec6e0d12e6de66 100644 (file)
@@ -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) {