mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 04:50:29 +00:00
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> (cherry picked from commit 0edba8b6ad9c83fa0a3cc58765fe9f123f4109ac) Conflicts: bgpd/bgp_packet.c
This commit is contained in:
parent
43ed4fe5cb
commit
0cd0d97907
@ -1177,6 +1177,7 @@ bgp_open_receive (struct peer *peer, bgp_size_t size)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
peer->rtt = sockopt_tcp_rtt (peer->fd);
|
||||
|
||||
if ((ret = bgp_event_update(peer, Receive_OPEN_message)) < 0)
|
||||
{
|
||||
@ -2346,7 +2347,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:
|
||||
|
Loading…
Reference in New Issue
Block a user