diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-10-22 11:35:17 +0300 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-12-08 14:11:18 -0500 |
commit | 0edba8b6ad9c83fa0a3cc58765fe9f123f4109ac (patch) | |
tree | 52e0410279dc9b20ba0bc8453e0e0c1f72e081cb | |
parent | 983525e8b560fc44d2214ca3f6d72af809b6ebd9 (diff) | |
download | quagga-0edba8b6ad9c83fa0a3cc58765fe9f123f4109ac.tar.bz2 quagga-0edba8b6ad9c83fa0a3cc58765fe9f123f4109ac.tar.xz |
bgpd: check rtt later after the real peer is known
OPEN message handler moves the connection from the temporary
"struct peer" (used to accept it) to the real "struct peer" based
on the configuration. RTT needs to be updated only to the real
struct peer, and this patch moves the RTT query to point where
realpeer is known.
Fixes: ef757700d0 "bgpd: allow using rtt in route-map's set metric"
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
-rw-r--r-- | bgpd/bgp_packet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 4ab5b064..a90e56b5 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -1572,6 +1572,7 @@ bgp_open_receive (struct peer *peer, bgp_size_t size) /* Get sockname. */ bgp_getsockname (peer); + peer->rtt = sockopt_tcp_rtt (peer->fd); BGP_EVENT_ADD (peer, Receive_OPEN_message); @@ -2582,7 +2583,6 @@ bgp_read (struct thread *thread) { case BGP_MSG_OPEN: peer->open_in++; - peer->rtt = sockopt_tcp_rtt(peer->fd); bgp_open_receive (peer, size); /* XXX return value ignored! */ break; case BGP_MSG_UPDATE: |