]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: prevent routes loop through itself
authorPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 30 Jun 2021 08:52:29 +0000 (10:52 +0200)
committerIgor Ryzhov <iryzhov@nfware.com>
Tue, 27 Jul 2021 09:25:12 +0000 (12:25 +0300)
commitfb8ae704615c5043ffe3209a14f51f7a701c307a
treefc70855d3f7026376cd383501f2027542da72b10
parent381752f3679b43f53f5c72e91153729853930a3f
bgpd: prevent routes loop through itself

Some BGP updates received by BGP invite local router to
install a route through itself. The system will not do it, and
the route should be considered as not valid at the earliest.

This case is detected on the zebra, and this detection prevents
from trying to install this route to the local system. However,
the nexthop tracking mechanism is called, and acts as if the route
was valid, which is not the case.

By detecting in BGP that use case, we avoid installing the invalid
routes.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
(cherry picked from commit 654a5978f695087af062bfc9a382321fa2ccc4ae)
bgpd/bgp_fsm.c
bgpd/bgp_mplsvpn.c
bgpd/bgp_nht.c
bgpd/bgp_nht.h
bgpd/bgp_route.c
tests/topotests/bgp_basic_functionality_topo1/test_bgp_basic_functionality.py