summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_fsm.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2021-06-30 10:52:29 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2021-07-12 13:57:36 +0200
commit654a5978f695087af062bfc9a382321fa2ccc4ae (patch)
treec76799ad69a06714dbb30253e025a04983c2c6d1 /bgpd/bgp_fsm.c
parentMerge pull request #9027 from ton31337/fix/missing_unlock_bgp_dest (diff)
downloadfrr-654a5978f695087af062bfc9a382321fa2ccc4ae.tar.xz
frr-654a5978f695087af062bfc9a382321fa2ccc4ae.zip
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>
Diffstat (limited to 'bgpd/bgp_fsm.c')
-rw-r--r--bgpd/bgp_fsm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index 79dc0aec9..c17296877 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -110,9 +110,9 @@ int bgp_peer_reg_with_nht(struct peer *peer)
&& !CHECK_FLAG(peer->bgp->flags, BGP_FLAG_DISABLE_NH_CONNECTED_CHK))
connected = 1;
- return bgp_find_or_add_nexthop(peer->bgp, peer->bgp,
- family2afi(peer->su.sa.sa_family),
- SAFI_UNICAST, NULL, peer, connected);
+ return bgp_find_or_add_nexthop(
+ peer->bgp, peer->bgp, family2afi(peer->su.sa.sa_family),
+ SAFI_UNICAST, NULL, peer, connected, NULL);
}
static void peer_xfer_stats(struct peer *peer_dst, struct peer *peer_src)