]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: fix the issue of connected tag error when BGP subscribes to NHT from Zebra 13440/head
authorJack.zhang <hanyu.zly@alibaba-inc.com>
Fri, 5 May 2023 06:58:32 +0000 (14:58 +0800)
committerJack.zhang <hanyu.zly@alibaba-inc.com>
Sat, 6 May 2023 01:57:27 +0000 (09:57 +0800)
commitd1fe52f05867c90b049d98fcea2745e68fb2f46d
tree854fdf394732fe7e8483e64761d90863ae74fe1b
parent8bc79f38555f142e5cbfcafc8a5af2549fc485ab
bgpd: fix the issue of connected tag error when BGP subscribes to NHT from Zebra

Imagine the following scenario:
1.Create a multihop ebgp peer and config the ttl as 254 for both side.
2.Call bgp_start and start an active connection.
Bgp will send a nht register with non-connected flag.
3.The function bgp_accept be called by remote connection.
Bgp will create a accept peer as a passive connection with default ttl(1). And then will send a nht register again with connected flag. This register result will cover the first one.
4.The active connection come to establish first. In funciton "peer_xfer_conn", check for "PEER_FLAG_CONFIG_NODE" flag of "from_peer->doppelganger" will not be pass, so we can not repair the nht register error forever.
Then the bgp nexthop will be like this:
2000::60 invalid, #paths 0, peer 2000::60
Must be Connected
Last update: Thu May 4 09:35:14 2023

The route from this peer can not be treat with a vaild nexthop forever.
This change will fix this error.

Signed-off-by: Jack.zhang <hanyu.zly@alibaba-inc.com>
bgpd/bgpd.c