summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-12-23FRR Release 10.0.3frr-10.0.3docker/10.0.3rc/10.0.3Donatas Abraitis
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-22Merge pull request #17714 from ↵Jafar Al-Gharaibeh
opensourcerouting/fix/backport_b6dcf618777bb7a11176617d647e16ab64f49b7b_10.0 bgpd: Fix `enforce-first-as` per peer-group removal (backport)
2024-12-22bgpd: Fix `enforce-first-as` per peer-group removalDonatas Abraitis
If we do `no neighbor PG enforce-first-as`, it wasn't working because the flag was inherited incorrectly for the members of the peer-group. Fixes: 322462920e2a2c8b73191c6eb5157d64cf4a593e ("bgpd: Enable enforce-first-as by default") Closes: https://github.com/FRRouting/frr/issues/17702 Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-21Merge pull request #17701 from ↵Jafar Al-Gharaibeh
opensourcerouting/fix/backport_b0800bfdf04b4fcf48504737ebfe4ba7f05268d3 bgpd: Validate only affected RPKI prefixes instead of a full RIB (backport)
2024-12-21Merge pull request #17688 from FRRouting/mergify/bp/stable/10.0/pr-17669Donatas Abraitis
bgpd: fix memory leak when reconfiguring a route distinguisher (backport #17669)
2024-12-20bgpd: Validate only affected RPKI prefixes instead of a full RIBDonatas Abraitis
Before this fix, if rpki_sync_socket_rtr socket returns EAGAIN, then ALL routes in the RIB are revalidated which takes lots of CPU and some unnecessary traffic, e.g. if using BMP servers. With a full feed it would waste 50-80Mbps. Instead we should try to drain an existing pipe (another end), and revalidate only affected prefixes. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-20bgpd: fix memory leak when reconfiguring a route distinguisherPhilippe Guibert
A memory leak happens when reconfiguring an already configured route distinguisher on an L3VPN BGP instance. Fix this by freeing the previous route distinguisher. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> (cherry picked from commit 0dd96287dda22b79ef6d7424f4e1a8dc92959f92)
2024-12-19Merge pull request #17680 from FRRouting/mergify/bp/stable/10.0/pr-17675Jafar Al-Gharaibeh
bgpd: Fix memory leak when creating BMP connection with a source interface (backport #17675)
2024-12-19bgpd: Fix memory leak when creating BMP connection with a source interfaceDonatas Abraitis
Testing done with: ``` for x in $(seq 1 100000); do vtysh -c 'conf' -c 'router bgp' -c 'bmp targets test' -c 'bmp connect localhost port 123 min-retry 100 max-retry 100 source-interface lo'; done ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit 7d19cb59cf5b129f61f3c568899343b3f031f9b4)
2024-12-17Merge pull request #17658 from FRRouting/mergify/bp/stable/10.0/pr-17615Jafar Al-Gharaibeh
lib: Take ge/le into consideration when checking the prefix with the prefix-list (backport #17615)
2024-12-17lib: Take ge/le into consideration when checking the prefix with the prefix-listDonatas Abraitis
Without the fix: ``` show ip prefix-list test_1 10.20.30.96/27 first-match <no result> show ip prefix-list test_2 192.168.1.2/32 first-match <no result> ``` With the fix: ``` ip prefix-list test_1 seq 10 permit 10.20.30.64/26 le 27 ! end donatas# show ip prefix-list test_1 10.20.30.96/27 seq 10 permit 10.20.30.64/26 le 27 (hit count: 1, refcount: 0) donatas# show ip prefix-list test_1 10.20.30.64/27 seq 10 permit 10.20.30.64/26 le 27 (hit count: 2, refcount: 0) donatas# show ip prefix-list test_1 10.20.30.64/28 donatas# show ip prefix-list test_1 10.20.30.126/26 seq 10 permit 10.20.30.64/26 le 27 (hit count: 3, refcount: 0) donatas# show ip prefix-list test_1 10.20.30.126/30 donatas# ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit dd4c2acc2e871283256f6cea16ede6d2d7f72dfe)
2024-12-11Merge pull request #17632 from ↵Donald Sharp
opensourcerouting/fix/backport_9b0b9282d317a9aeab36d9a8b08a35fe9a172c4b_10.0 bgpd: Fix bgp core with a possible Intf delete (backport)
2024-12-11bgpd: Fix bgp core with a possible Intf deleteRajasekar Raja
Although trigger unknown, based on the backtrace in one of the internal testing, we do see some delete in the Intf where we can have the peer ifp pointer null and we try to dereference it while trying to install the route leading to a crash Skip updating the ifindex in such cases and since the nexthop is not properly updated, BGP skips sending it to zebra. BackTrace: 0 0x00007faef05e7ebc in ?? () from /lib/x86_64-linux-gnu/libc.so.6 1 0x00007faef0598fb2 in raise () from /lib/x86_64-linux-gnu/libc.so.6 2 0x00007faef09900dc in core_handler (signo=11, siginfo=0x7ffdde8cb4b0, context=<optimized out>) at lib/sigevent.c:274 3 <signal handler called> 4 0x00005560aad4b7d8 in update_ipv6nh_for_route_install (api_nh=0x7ffdde8cbe94, is_evpn=false, best_pi=0x5560b21187d0, pi=0x5560b21187d0, ifindex=0, nexthop=0x5560b03cb0dc, nh_bgp=0x5560ace04df0, nh_othervrf=0) at bgpd/bgp_zebra.c:1273 5 bgp_zebra_announce_actual (dest=dest@entry=0x5560afcfa950, info=0x5560b21187d0, bgp=0x5560ace04df0) at bgpd/bgp_zebra.c:1521 6 0x00005560aad4bc85 in bgp_handle_route_announcements_to_zebra (e=<optimized out>) at bgpd/bgp_zebra.c:1896 7 0x00007faef09a1c0d in thread_call (thread=thread@entry=0x7ffdde8d7580) at lib/thread.c:2008 8 0x00007faef095a598 in frr_run (master=0x5560ac7e5190) at lib/libfrr.c:1223 9 0x00005560aac65db6 in main (argc=<optimized out>, argv=<optimized out>) at bgpd/bgp_main.c:557 (gdb) f 4 4 0x00005560aad4b7d8 in update_ipv6nh_for_route_install (api_nh=0x7ffdde8cbe94, is_evpn=false, best_pi=0x5560b21187d0, pi=0x5560b21187d0, ifindex=0, nexthop=0x5560b03cb0dc, nh_bgp=0x5560ace04df0, nh_othervrf=0) at bgpd/bgp_zebra.c:1273 1273 in bgpd/bgp_zebra.c (gdb) p pi->peer->ifp $26 = (struct interface *) 0x0 Ticket :#4203904 Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
2024-12-05Merge pull request #17596 from ↵Jafar Al-Gharaibeh
opensourcerouting/fix/backport_12a9ca4de6c781b061cccdf3e793346e23558901_10.0 bgpd: fix unconfigure asdot neighbor (backport)
2024-12-05bgpd: fix unconfigure asdot neighborPhilippe Guibert
The below command is not successfull on an existing as dot peer > no neighbor 10.0.0.2 remote-as 1.1 > % Create the peer-group or interface first Handle the case where the remote-as argument can be an ASNUM. Fixes: 8079a4138d61 ("lib, bgp: add initial support for asdot format") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-03Merge pull request #17564 from FRRouting/mergify/bp/stable/10.0/pr-17518Jafar Al-Gharaibeh
pimd: Fix access-list memory leak in pimd (backport #17518)
2024-12-03Merge pull request #17560 from FRRouting/mergify/bp/stable/10.0/pr-17313Jafar Al-Gharaibeh
zebra: separate zebra ZAPI server open and accept (backport #17313)
2024-12-03pimd: Fix access-list memory leak in pimdCorey Siltala
Reset access-lists in pimd on terminate Signed-off-by: Corey Siltala <csiltala@atcorp.com> (cherry picked from commit d21a993f16dc23df6a1f1a7c81e9f562446437a0)
2024-12-03zebra: separate zebra ZAPI server open and acceptMark Stapp
Separate zebra's ZAPI server socket handling into two phases: an early phase that opens the socket, and a later phase that starts listening for client connections. Signed-off-by: Mark Stapp <mjs@cisco.com> (cherry picked from commit 506097a1b96974c261411edd25330ceaf90fa3db)
2024-11-28Merge pull request #17524 from FRRouting/mergify/bp/stable/10.0/pr-17510Donatas Abraitis
bgpd: fix use single whitespace when displaying flowspec entries (backport #17510)
2024-11-26bgpd: fix use single whitespace when displaying flowspec entriesPhilippe Guibert
There is an extra space in the 'Displayed' line of show bgp command, that should not be present. Fix this by being consistent with the output of the other address families. Fixes: ("a1baf9e84f71") bgpd: Use single whitespace when displaying show bgp summary Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> (cherry picked from commit 561debab5430ac85e8e42e839312d213479a767a)
2024-11-26Merge pull request #17513 from FRRouting/mergify/bp/stable/10.0/pr-17506Russ White
bgpd: fix version attribute is an int, not a string (backport #17506)
2024-11-26bgpd: fix version attribute is an int, not a stringPhilippe Guibert
The json display of the version attribute is originally an integer. It has changed, most probably mistakenly. > { > "vrfId": 7, > "vrfName": "vrf1", > "tableVersion": 3, > "routerId": "192.0.2.1", > "defaultLocPrf": 100, > "localAS": 65500, > "routes": { > "172.31.0.1/32": { > "prefix": "172.31.0.1/32", > "version": "1", <--- int or string ?? Let us fix it, by using the integer display instead. Fixes: f9f2d188e398 ("bgpd: fix 'json detail' output structure") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> (cherry picked from commit c5d7815cccb92c192ca6b752843b8b827a607b53)
2024-11-22Merge pull request #17489 from FRRouting/mergify/bp/stable/10.0/pr-17487Donald Sharp
bgpd: Do not reset peers on suppress-fib toggling (backport #17487)
2024-11-22bgpd: Do not reset peers on suppress-fib togglingDonatas Abraitis
If the desired state is the same - do nothing instead of resetting once again. Fixes: bdb5ae8bce94432eb5e581f04f48dc4aa5db7ca4 ("bgpd: Make suppress-fib-pending clear peering") Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit 7fb4c03f5b1c9cd4e8acb85b4cf953ac85aa0bbf)
2024-11-19Merge pull request #17448 from ↵Donald Sharp
opensourcerouting/fix/backport_65a43b57efd60c4fdf80c935750046ba861ec79f_10.0 bgpd: Validate both nexthop information (NEXTHOP and NLRI) (backport)
2024-11-17bgpd: Validate both nexthop information (NEXTHOP and NLRI)Donatas Abraitis
If we receive an IPv6 prefix e.g.: 2001:db8:100::/64 with nextop: 0.0.0.0, and mp_nexthop: fc00::2, we should not treat this with an invalid nexthop because of 0.0.0.0. We MUST check for MP_REACH attribute also and decide later if we have at least one a valid nexthop. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit a0d2734e879f78fbef5f1815429de331b9940c73)
2024-11-12Merge pull request #17417 from FRRouting/mergify/bp/stable/10.0/pr-17402Jafar Al-Gharaibeh
bgpd: Fix for match source-protocol in route-map for redistribute cmd (backport) (backport #17402)
2024-11-12bgpd: Fix for match source-protocol in route-map for redistribute cmdRajasekar Raja
A redistribute cmd can have a route-map attached to it and adding the match source-protocol to that route-map means BGP to filter which protocol routes to accept among the bunch of routes zebra is sending. Fixing this since this wasnt implemented earlier. Ticket :#4119692 Signed-off-by: Donald Sharp <sharpd@nvidia.com> Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com> (cherry picked from commit 68358c0f928eafe50c9e73b0cb6a443c03f2a33f) Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit f93e5aa1663d9b375e0673f4eed367f9a009fa88)
2024-11-12Merge pull request #17405 from FRRouting/mergify/bp/stable/10.0/pr-15686Russ White
BGP TCP non established : get port and ip (backport #15686)
2024-11-11bgpd: fix addressing information of non established outgoing sessionsPhilippe Guibert
When trying to connect to a BGP peer that does not respons, the 'show bgp neighbors' command does not give any indication on the local and remote addresses used: > # show bgp neighbors > BGP neighbor is 192.0.2.150, remote AS 65500, local AS 65500, internal link > Local Role: undefined > Remote Role: undefined > BGP version 4, remote router ID 0.0.0.0, local router ID 192.0.2.1 > BGP state = Connect > [..] > Connections established 0; dropped 0 > Last reset 00:00:04, Waiting for peer OPEN (n/a) > Internal BGP neighbor may be up to 255 hops away. > BGP Connect Retry Timer in Seconds: 120 > Next connect timer due in 117 seconds > Read thread: off Write thread: off FD used: 27 The addressing information (address and port) are only available when TCP session is established, whereas this information is present at the system level: > root@ubuntu2204:~# netstat -pan | grep 192.0.2.1 > tcp 0 0 192.0.2.1:179 192.0.2.150:38060 SYN_RECV - > tcp 0 1 192.0.2.1:46526 192.0.2.150:179 SYN_SENT 488310/bgpd Add the display for outgoing BGP session, as the information in the getsockname() API provides information for connected streams. When getpeername() API does not give any information, use the peer configuration (destination port is encoded in peer->port). > # show bgp neighbors > BGP neighbor is 192.0.2.150, remote AS 65500, local AS 65500, internal link > Local Role: undefined > Remote Role: undefined > BGP version 4, remote router ID 0.0.0.0, local router ID 192.0.2.1 > BGP state = Connect > [..] > Connections established 0; dropped 0 > Last reset 00:00:16, Waiting for peer OPEN (n/a) > Local host: 192.0.2.1, Local port: 46084 > Foreign host: 192.0.2.150, Foreign port: 179 Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> (cherry picked from commit 78ce63952a99e572ccd7b56fac9a211c2641ca91)
2024-11-11bgpd: remove useless control checks about TCP connectionPhilippe Guibert
When attempting to get the src and destination addresses of a given connection, the API may return the NULL pointer, but further code in bgp_zebra_nexthop_set() already does a check about the given pointer. Relaxing the error code for all the returned adressing. Fixes: 1ff9a340588a ("bgpd: bgpd-fsm-fix.patch") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> (cherry picked from commit ba7130309954fbe8d58854339ca43259149e603a)
2024-11-08Merge pull request #17393 from opensourcerouting/fix/backport_17376_10.0Donald Sharp
bgpd: Clear stale routes with multiple paths (backport)
2024-11-08bgpd: Set LLGR stale routes for all the paths including addpathDonatas Abraitis
Without this patch we set only the first path for the route (if multiple exist) as LLGR stale and stop doing that for the rest of the paths, which is wrong. Fixes: 1479ed2fb35f4a5ae1017201a7ee37ba2727163a ("bgpd: Implement LLGR helper mode") Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-08bgpd: Clear all paths including addpath once GR expiresDonatas Abraitis
We iterated over all bgp_path_info's, but once we remove the path, we didn't check for other paths under the same bgp_dest. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-05Merge pull request #17349 from FRRouting/mergify/bp/stable/10.0/pr-17305Donald Sharp
bgpd: Treat numbered community-list only if it's in a range 1-500 (backport #17305)
2024-11-05Merge pull request #17354 from FRRouting/mergify/bp/stable/10.0/pr-17319Donald Sharp
ospfd: Use router_id what Zebra has if we remove a static router_id (backport #17319)
2024-11-05ospfd: Use router_id what Zebra has if we remove a static router_idDonatas Abraitis
If we set router-id, e.g. `router-id x.x.x.x`, then we have: ``` pc.donatas.net# show ip ospf | include Router ID OSPF Routing Process, Router ID: x.x.x.x ``` But once we remove it (`no router-id x.x.x.x`), the old router-id remains. This is kinda OK, but to be consistent with OSPFv3 we should use what Zebra already has, instead of retaining the old one. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit 1073e0f9b39b2810a114dea03f2d1e0b14e414d4)
2024-11-05ospfd: Add a hidden command for old `no router-id`Donatas Abraitis
A new command is `ospf router-id ...`, but the old one is also valid. Just a no form was missed. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit 80bfe6784fa945640251ae5c907899eb9d77cc0a)
2024-11-05bgpd: Treat numbered community-list only if it's in a range 1-500Donatas Abraitis
Before this patch, if we set something like: ``` bgp extcommunity-list expanded 1234 permit admin ``` In running config we have: ``` bgp extcommunity-list 1234 seq 5 permit admin ``` That leads to incorrect rendering, even more the line can't be deleted. With this fix we treat numbered community-list only if it's inside the range 1-500, otherwise it's a non-numbered clist. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit 4c1ee29116aff081f63b1fc7dad18cbfe1b8007f)
2024-10-31Merge pull request #17323 from FRRouting/mergify/bp/stable/10.0/pr-17318Mark Stapp
zebra: Add missing new line for help string (backport #17318)
2024-10-31Merge pull request #17302 from FRRouting/mergify/bp/stable/10.0/pr-17250Donatas Abraitis
isisd: fix change flex-algorithm number from uint32 to uint8 (backport #17250)
2024-10-31zebra: Add missing new line for help stringDonatas Abraitis
``` -A, --asic-offload FRR is interacting with an asic underneath the linux kernel --v6-with-v4-nexthops Underlying dataplane supports v6 routes with v4 nexthops -s, --nl-bufsize Set netlink receive buffer size ``` Fixes: 1f5611c06d1c243b42279748788f0627793ead9c ("zebra: Allow zebra cli to accept v6 routes with v4 nexthops") Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit 25ae643996d338b8230fb15a9064843fe85de224)
2024-10-30isisd: fix change flex-algorithm number from uint32 to uint8Philippe Guibert
The algorithm number is encoded on 8 bits and does not require an unsigned 32 bit value to store the value. Fixes: cc4926c1284e ("isisd,yang: add algorithm-prefix-sid configuration tree") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> (cherry picked from commit 8e861a75e8b426f0944157387699fe1ab322fe8e)
2024-10-29Merge pull request #17288 from opensourcerouting/16354-bp-10.0Russ White
(10.0 backport) bgpd: add `bgp ipv6-auto-ra` command
2024-10-29Merge pull request #17284 from FRRouting/mergify/bp/stable/10.0/pr-17278Russ White
bgpd: fix blank line in running-config with bmp listener cmd (backport #17278)
2024-10-29Merge pull request #17293 from FRRouting/mergify/bp/stable/10.0/pr-17245Russ White
bgpd: fix crash when polling bgp4v2PathAttrTable (backport #17245)
2024-10-29bgpd: fix crash when polling bgp4v2PathAttrTableFrancois Dumontet
we have (gdb) p *path->attr->aspath $1 = {refcnt = 3, segments = 0x0, json = 0x0, str = 0x55723d0b7470 "", str_len = 0, asnotation = ASNOTATION_PLAIN} It looks like this aspath is empty, resulting in a size 0 and NULL pointer for path->attr->aspath->segments which leads to the SIGSEGV fixe: return 0 when segments is null. Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com> (cherry picked from commit ee2f1b85cf95fcbfd0a54dc15b911f525e96b163)
2024-10-29bgpd: add `bgp ipv6-auto-ra` commandMikhail Sokolovskiy
Introduce a command to stop bgpd from enabling IPv6 router advertisement messages sending on interfaces. Signed-off-by: Mikhail Sokolovskiy <sokolmish@gmail.com>
2024-10-29bgpd: fix blank line in running-config with bmp listener cmdPhilippe Guibert
An extra blank line is added in show running-config with BMP: > ubuntu2204hwe(config)# router bgp 65500 > ubuntu2204hwe(config-router)# bmp targets tgt > ubuntu2204hwe(config-bgp-bmp)# bmp monitor ipv4 unicast pre-policy > ubuntu2204hwe(config-bgp-bmp)# bmp listener 192.0.2.100 port 44 > ubuntu2204hwe(config-bgp-bmp)# do show running-config > > router bgp 65500 > [..] > bmp targets tgt > bmp monitor ipv4 unicast pre-policy > <-- blank line > bmp listener 192.0.2.100 port 44 > exit Remove the blank line. Fixes: ed18356f1f2d ("bgpd/bmp: BMP implementation") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> (cherry picked from commit 9a33ee18bfe2769e173911d69cee64b78143184b)