]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: update rtt on soft clear
authorTimo Teräs <timo.teras@iki.fi>
Thu, 22 Oct 2015 08:35:18 +0000 (11:35 +0300)
committervivek <vivek@cumulusnetworks.com>
Mon, 6 Jun 2016 17:41:00 +0000 (10:41 -0700)
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>
(cherry picked from commit 5a2a1ec18c89daec5de6690a9b0f47c0d11a0f2d)

Conflicts:
bgpd/bgpd.c

bgpd/bgpd.c

index 1e61b0fa2c9ad1b7a4f01ca73d19d31b43dfac26..fca6e5bb1b9d4010d5e722aba79501a8495a50f8 100644 (file)
@@ -27,6 +27,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"
@@ -5982,6 +5983,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_OUT || stype == BGP_CLEAR_SOFT_BOTH)
     {
       /* Clear the "neighbor x.x.x.x default-originate" flag */