]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: fix do re-send post-policy bgp update when not valid
authorPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 29 Oct 2024 15:20:18 +0000 (16:20 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 30 Dec 2024 14:13:37 +0000 (15:13 +0100)
commit6e2d58854dbbcfa052d56a6b9479ae5988aa0c61
treed1b649b062879383ce019ffce88fc17a5605a75a
parent955da5cbaa95e349c8a3aab2cde979eed748d8ad
bgpd: fix do re-send post-policy bgp update when not valid

When a BGP listener configured with BMP receives the first BGP
IPv6 update from a connected BGP IPv6 peer, the BMP collector
receives a withdraw post-policy message.

> {"peer_type": "route distinguisher instance", "policy": "post-policy",
> "ipv6": true, "peer_ip": "192:167::3", "peer_distinguisher": "444:1",
> "peer_asn": 65501, "peer_bgp_id": "192.168.1.3", "timestamp":
> "2024-10-29 11:44:47.111962", "bmp_log_type": "withdraw", "afi": 2,
> "safi": 1, "ip_prefix": "2001::1125/128", "seq": 22}
> {"peer_type": "route distinguisher instance", "policy": "pre-policy",
> "ipv6": true, "peer_ip": "192:167::3", "peer_distinguisher": "444:1",
> "peer_asn": 65501, "peer_bgp_id": "192.168.1.3", "timestamp":
> "2024-10-29 11:44:47.111963", "bmp_log_type": "update", "origin":
> "IGP", "as_path": "", "afi": 2, "safi": 1, "nxhp_ip": "192:167::3",
> "nxhp_link-local": "fe80::7063:d8ff:fedb:9e11", "ip_prefix": "2001::1125/128", "seq": 23}

Actually, the BGP update is not valid, and BMP considers it as a
withdraw message. The BGP upate is not valid, because the nexthop
reachability is unknown at the time of reception, and no other
BMP message is sent.

Fix this by re-sending a BMP post update message when nexthop
tracking becomes successfull. Generalise the re-sending of
messages when nexthop tracking changes.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_bmp.c
bgpd/bgp_nht.c
bgpd/bgp_nht.h
bgpd/bgp_trace.h