From 5a2a1ec18c89daec5de6690a9b0f47c0d11a0f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Thu, 22 Oct 2015 11:35:18 +0300 Subject: bgpd: update rtt on soft clear MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rtt is calculated dynamically by the kernel. Refresh it on soft clear. Fixes: ef757700d0 "bgpd: allow using rtt in route-map's set metric" Signed-off-by: Timo Teräs --- bgpd/bgpd.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bgpd') diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 60428586..734c0df4 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -26,6 +26,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "stream.h" #include "command.h" #include "sockunion.h" +#include "sockopt.h" #include "network.h" #include "memory.h" #include "filter.h" @@ -4649,6 +4650,8 @@ peer_clear_soft (struct peer *peer, afi_t afi, safi_t safi, if (! peer->afc[afi][safi]) return BGP_ERR_AF_UNCONFIGURED; + peer->rtt = sockopt_tcp_rtt (peer->fd); + if (stype == BGP_CLEAR_SOFT_RSCLIENT) { if (! CHECK_FLAG (peer->af_flags[afi][safi], PEER_FLAG_RSERVER_CLIENT)) -- cgit v1.2.3