summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_nht.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2023-03-07 21:36:15 +0100
committerDonatas Abraitis <donatas@opensourcerouting.org>2023-03-07 21:36:15 +0100
commite9ad26e53f0b307d73da6f3083851054a5734ce9 (patch)
tree102bf6f01642e0f06f294320146603a725832cf8 /bgpd/bgp_nht.c
parentMerge pull request #12890 from pguibert6WIND/attr_cleaning_misc (diff)
downloadfrr-e9ad26e53f0b307d73da6f3083851054a5734ce9.tar.xz
frr-e9ad26e53f0b307d73da6f3083851054a5734ce9.zip
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 <donatas@opensourcerouting.org>
Diffstat (limited to '')
-rw-r--r--bgpd/bgp_nht.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index 25b458a8e..473c95071 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) {