From 2ae3b6f409ab00d69cd8415c0f9acd6f751f5918 Mon Sep 17 00:00:00 2001 From: claudio Date: Thu, 27 May 2021 09:15:51 +0000 Subject: [PATCH] Use negotiated capabilities to decide if a ROUTE-REFRESH message can be sent (and also for which AFI/SAFI). Use a slightly better way to write return if neither route-refresh nor enhanced route-refresh are on. --- usr.sbin/bgpd/session.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 4ff632ee236..20a8bf4f94c 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.419 2021/05/27 09:10:03 claudio Exp $ */ +/* $OpenBSD: session.c,v 1.420 2021/05/27 09:15:51 claudio Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer @@ -1645,11 +1645,11 @@ session_neighbor_rrefresh(struct peer *p) { u_int8_t i; - if (!p->capa.neg.refresh && !p->capa.peer.enhanced_rr) + if (!(p->capa.neg.refresh || p->capa.neg.enhanced_rr)) return (-1); for (i = 0; i < AID_MAX; i++) { - if (p->capa.peer.mp[i] != 0) + if (p->capa.neg.mp[i] != 0) session_rrefresh(p, i, ROUTE_REFRESH_REQUEST); } -- 2.20.1