bgpd: update rtt on soft clear
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 <timo.teras@iki.fi>
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 6042858..734c0df 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -26,6 +26,7 @@
#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 @@
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))