Page MenuHomeVyOS Platform

BGP routes withdrawn after a short link flap when the iBGP next hop resolves through a static route
Open, HighPublicBUG

Description

iBGP between loopbacks; the peer loopback is reached by protocols static route 10.255.0.2/32 next-hop 10.0.12.2 (with or without interface eth1). After a 3 ms carrier drop on eth1 the session stays Established and the static route stays installed, but bgpd marks the next hop invalid and withdraws every route from that peer. It was still invalid at +120 s:

 10.255.0.2 invalid, #paths 1004, peer 10.255.0.2
  BGP state = Established, up for 00:03:02
ip route get 198.18.1.1  ->  RTNETLINK answers: Network is unreachable

Runs with routes kept (5 runs each, same on two test hosts):

                                   1.5.1   rolling
static next-hop                    5/5     0/5
static next-hop + interface        5/5     0/5
same, graceful restart both ends   5/5     0/5

With graceful restart the helper keeps no stale paths either.

Cause: FRR 5de395fc8a "bgpd: Fix condition when evaluating paths". On interface down bgpd frees the next-hop entry and leaves nexthop_num = 0; on interface up the new condition skips entries with nexthop_num 0, so bgpd never marks the next hop valid again. With the commit reverted, bgpd sends the Valid update ~4 ms after the link comes back.

Suggested fix: revert 5de395fc8a in the VyOS FRR build (or fix the condition to re-evaluate after down/up), and report it upstream against FRR PR #20975.

Details

Version
rolling, 1.5
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)