summaryrefslogtreecommitdiffstats
path: root/lib/csv.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-10-17lib: zlog stays running on shutdownDavid Lamparter1-1/+15
No `zlog_fini()`, please. Getting log messages until the end is more important than leaking memory allocated for zlog targets. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-10-17lib: actually propagate MGROUP argsDavid Lamparter1-0/+5
Well, this was only checked for exit status, which we didn't really observe... so, uh, yeah, not particularly noticeable it wasn't even wired up... clang-format off/on added to not get formatting wrecked on this. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-10-16ospfd: Fixup ospf_lsa.[ch] to properly spell out parameters for functionsDonald Sharp2-89/+77
Our standard says when in a .h file and declaring a function all parameters must have their variables spelled out. Let's do this for ospf_lsa.h Modified ospf_lsa.c to also use event instead of thread, and uint8_t instead of unsigned short. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-15zebra: unlock node only after operation in zebra_free_rnh()Enke Chen1-2/+1
Move route_unlock_node() after rnh_list_del(). Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2024-10-15zebra: Attempt to explain the rnh tracking code betterDonald Sharp1-2/+66
I got asked today what was going on in the rnh code. I had to take time off of what I was doing and rewrap my head around this code, since it's been a long time. As that this question may come up again in the future I am trying to document this better so that someone coming behind us will be able to read this and get a better idea of what the algorithm is attempting to do. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-15vtysh: fix SA warning, no need to call getenv() twiceJafar Al-Gharaibeh1-3/+2
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-10-15tests: Check if underlay IGP metric is reflected into BGP after cost changesDonatas Abraitis7-0/+288
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-15bgpd: Re-announce the routes if the underlay IGP metric changesDonatas Abraitis1-4/+3
If the underlay IGP metric changes, we SHOULD re-announce the routes with the correct bpi->extra->igpmetric set. Without this patch if the IGP link cost (metric) changes, we never notice this and the peers do not have the updated metrics, which in turn causes incorrect best path selections on remote peers. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-15doc: Add `set metric aigp` commandDonatas Abraitis2-3/+6
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-15tests: Check if `set metric aigp` worksDonatas Abraitis2-19/+24
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-15bgpd: Implement `set metric aigp` commandDonatas Abraitis4-14/+47
Same as `set metric igp`, but in this case accumulated IGP metric is being sent as MED attribute. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-15tests: Check if MED can be derived from `set metric igp|aigp`Donatas Abraitis5-1/+51
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-15bgpd: Implement `set metric igp` commandDonatas Abraitis5-12/+57
Set metric automatically from the path info (IGP protocol). Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-15bgpd: Set MED using a helper bgp_attr_set_med()Donatas Abraitis7-31/+30
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-15tests: iproute2_check_path_selection call the actual commandDonald Sharp1-1/+1
For some reason this was missing. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-15bgpd: fix bmp coverity issue 1600779Louis Scalbert1-1/+1
Fix bmp coverity issue 1600779. peer->su_local cannot be NULL. Fixes: 035304c25a ("bgpd: bmp loc-rib peer up/down for vrfs") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-15tools/gcc-plugins: don't crash on array parametersDavid Lamparter1-1/+2
Need to have arrays as a stop condition in this type normalization function, like pointers and function pointers. Actual arrays as argument types are extremely rare to see because C has this array-decay-to-pointer thing, but it can happen. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-10-15bgpd: Check if su_local/su_remote exist before encoding BMP peer stateDonatas Abraitis1-2/+2
Fixes: 035304c25a3890a040acbe23ca385750b062cdce ("bgpd: bmp loc-rib peer up/down for vrfs") Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-15bgpd: Remove unused BGP_NEXTHOP_CONNECTED_CHANGED flag for nexthopDonatas Abraitis2-13/+5
Also reduce the size of change_flags, which is way enough to be 1 byte. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-15ospfd:fix the bug that the empty area was not free after the command was ↵Shbinging1-0/+2
executed When we use the no area X.X.X.X range A.B.C.D/M command, if the area no longer has an interface to which it belongs, then the area should be deleted from the LSDB. This processing logic is consistent with instructions such as no network area and no area authentication. Signed-off-by: Shbinging <bingshui@smail.nju.edu.cn>
2024-10-15tests: fix and adjust topotest/bgp_aigpEnke Chen12-35/+111
Fix and adjust the topotest post the fix for route selection with AIGP. When there are multiple IGP domains (OSPF in this case), the nexthop for a BGP route with the AIGP attribute must be resolved in its own IGP domain. The changes in r2/bgpd.conf and r3/bgpd.conf are needed as incorrect IGP metrics are received from NHT for the recursive nexthops. Once the issue is resolved, the changes can be reverted. Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2024-10-15bgpd: fix route selection with AIGPEnke Chen3-12/+12
The nexthop metric should be added to AIGP when calculating the bestpath in bgp_path_info_cmp(). Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2024-10-14bgpd: fix evpn mh esi flap remove local routesChirag Shah4-7/+46
In symmetric routing, when local ESI is down, the MH peer learnt local mac-ip prefix is installed into teannt vrf (given l3vni). When ESI is back up and associated to evi/vni then remove the local synced mac-ip imported routes from the tenant vrf as local neigh/arp is present. Ticket: #3878699 Testing: peer advertised mac-ip route: *> [2]:[0]:[48]:[aa:aa:aa:00:00:01]:[32]:[45.0.0.51] RD 27.0.0.4:9 27.0.0.4 (spine-1) 0 64435 65016 i ESI:03:44:38:39:ff:ff:01:00:00:01 RT:65016:1000 RT:65016:4000 ET:8 Rmac:44:38:39:ff:ff:16 When local ESI is flapped torm-11:# ip neigh show 45.0.0.51 45.0.0.51 dev vlan1000 lladdr aa:aa:aa:00:00:01 REACHABLE proto zebra Before fix: (The imported route remained in tenant-vrf) torm-11:# ip route show vrf vrf1 45.0.0.51 45.0.0.51 nhid 257 proto bgp metric 20 After fix: torm-11# ip route show vrf vrf1 45.0.0.51 torm-11# trace: 2024/10/11 18:19:29 BGP: [JMP3T-178G8] route [2]:[0]:[48]:[00:02:00:00:00:08]:[32]:[21.1.0.5] is matched on local esi 03:00:00:00:77:01:04:00:00:0e, uninstall from VRF tenant1 route table Signed-off-by: Chirag Shah <chirag@nvidia.com>
2024-10-14zebra: Prevent a kernel route from being there when a connected shouldDonald Sharp1-0/+37
There exists a series of events where a kernel route is learned first( that happens to be exactly what a connected route should be ) and FRR ends up with both a kernel route and a connected route, leaving us in a very strange spot. This code change just mirrors the existing code of if there is a connected route drop the kernel route. Here we just do the reverse, if we have a kernel route already and a connected should be created, remove the kernel and keep the connected. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-14tests: fix bgp_as_override number of routersLouis Scalbert1-1/+1
There is only 4 routers not 6. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-14doc: clarify bgp as-overrideLouis Scalbert1-1/+2
Clarify bgp as-override Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-14bgpd, tests: don't send local nexthop from rr clientLouis Scalbert3-84/+13
AS 65000 | AS 65001 | RR | | | R1 --- | --- R2 | When r1 peer is an iBGP route reflector client of rr and r2 peer is a eBGP neighbor of rr, and all three routers shares the same network, r2 receives announcements coming from r1 with a IPv6 link-local nexthop from rr. This is incorrect as r2 should send traffic to r1 without involving rr. Do not send an IPv6 link-local nexthop if the originating peer is a route-reflector client. Link: https://github.com/FRRouting/frr/pull/16219#issuecomment-2397425505 Link: https://github.com/FRRouting/frr/pull/17037#discussion_r1792529683 Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-14bgpd: rename reflect in subgroup_announce_checkLouis Scalbert1-12/+10
In subgroup_announce_check(), the variable reflect is misleading, as it suggests a relation to route reflection. However, it actually refers to the scenario where an iBGP peer announces a route to another iBGP peer. Rename reflect to ibgp_to_ibgp. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-13isisd: Remove circuit state check for openfabricDonatas Abraitis1-9/+1
If we have something like: ``` int eth1 ip router openfabric x ipv6 router openfabric x ``` And eth1 is removed, the first `ip router ...` fails and only `ipv6 router ...` is enabled. If we leave only: ``` int eth1 ipv6 router openfabric x ``` Then also, no interface is going to be enabled, which is weird too. Fixes: https://github.com/FRRouting/frr/issues/17075 Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-13zebra: add back one field for debuganlan_cs1-8/+6
The `flags` field is removed recently, so add back it for debug. Signed-off-by: anlan_cs <anlan_cs@126.com>
2024-10-11fpm: Allow max fpm message size to float based on ecmpDonald Sharp1-1/+1
Currently the max message size is 4k. With a 256 way ecmp FRR is seeing message sizes that are in the 6k size. There is desire to allow this to increase as well to 512. Since the multipath size directly effects how big the message may be when sending the routes ecmp let's give a bit of headroom for this value when compiling FRR at greater sizes. Additionally since we know not everyone is using such large ecmp, allow them to build as appropriate for their use cases. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-11zebra: Slow down fpm_process_queueDonald Sharp1-2/+6
When the fpm_process_queue has run out of space but has written to the fpm output buffer, schedule it to wake up immediately, as that the write will go out pretty much immediately, since it was scheduled first. If the fpm_process_queue has not written to the output buffer then delay the processing by 10 milliseconds to allow a possibly backed up write processing to have a chance to complete it's work. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-11zebra: Only notify dplane work pthread when neededDonald Sharp1-1/+1
The fpm_nl_process function was getting the count of the total number of ctx's processed. This leads to after having processed 1 context to always signal the dataplane that there is work to do. Change the code to only notify the dplane worker when a context was actually added to the outgoing context queue. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-11topotest: add bgp_bmp_vrf topotestLouis Scalbert6-0/+383
Add test to check BMP in VRF. Note that the following configuration works with interface r1-eth0 towards 192.0.2.10 (BMP collector) in the default VRF but not in vrf1. > router bgp 65501 vrf vrf1 > bmp targets bmp1 > bmp connect 192.0.2.10 port 1789 min-retry 100 max-retry 10000 Also, for some reasons, the test works even without "bgpd: bmp loc-rib peer up/down for vrfs" commit. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-11topotests: check for bmp peer up/down messagesLouis Scalbert1-0/+59
Check for bmp peer up / down messages Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-11topotests: add peer down log in bmp collectorLouis Scalbert1-2/+16
Add peer down log in bmp collector Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-11topotests: log bmp peer up message type in collectorLouis Scalbert1-0/+1
Log "peer up" message type in BMP collector logs. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-11bgpd: bmp loc-rib peer up/down for vrfsMaxence Younsi6-62/+289
added bmp bgp peer for vrfs added peer up vrf in bmp peer up state added vrf state in bmpbgp added safe bmp_peer_sendall : bmp_peer_sendall_safe changed bgp_open_send to call new bgp_open_make bgp_open_make creates a bgp open packet, now used in bmp for peer up vrf added hook and call to bgp instance state vrf peer state is recomputed when interfaces (including vrf itf) go up / down and when it gets created or removed Link: https://github.com/mxyns/frr/commit/e48ba380700d53124131f4e4419f646c05b40c86 Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com> Signed-off-by: Maxence Younsi <mx.yns@outlook.fr>
2024-10-11topotests: check export labels to pre-policy bmpLouis Scalbert1-9/+5
Check export labels to pre-policy bmp Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-11tests: test nexthop-local unchanged with reflectorLouis Scalbert6-38/+273
Test nexthop-local unchanged with route-reflector. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-11tests: test nexthop-local unchanged with route-serverLouis Scalbert15-31/+1144
Test nexthop-local unchanged with route-server. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-11bgpd: split nexthop-local unchanged peer subgroupLouis Scalbert1-0/+16
5bb99ccad2 ("bgpd: reset ipv6 invalid link-local nexthop") now resets the link-local when originating and destination peers are not on the same network segment. However, it does not work all the time. The fix compares the 'from' and 'peer' global IPv6 address. However, 'peer' refers to one of the peers of subgroup. The subgroup may contain peers located on different network segment. Split nexthop-local unchanged peer subgroup by network segment. Fixes: 5bb99ccad2 ("bgpd: reset ipv6 invalid link-local nexthop") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-11tests: unset r3 enforce-first-as bgp_route_server_clientLouis Scalbert2-0/+27
Unset enforce-first-as on r3 of bgp_route_server_client to enable the reception of routes on this router. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-11tests: rework bgp_route_server_clientLouis Scalbert5-55/+219
Rework bgp_route_server_client in a more standard form in order to facilitate the next commut changes. Cosmetic change. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-11doc: routemap: fix typosSimon Ruderich1-2/+2
Signed-off-by: Simon Ruderich <simon@ruderich.org>
2024-10-10debian, redhat: frr dev 10.3 package housekeepingJafar Al-Gharaibeh2-1/+10
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-10-10debian, redhat: updating changelog for 10.1 releaseJafar Al-Gharaibeh2-4/+17
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-10-10bgpd: changes for code maintainabilitysri-mohan12-46/+34
these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2024-10-10bgpd: Move some non BGP-specific route-map functions to libDonatas Abraitis2-80/+73
They are managed under `frr-route-map`, not under `frr-bgp-route-map`. Fixes: https://github.com/FRRouting/frr/issues/17055 Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-10lib: Apply and generate route-map commands earlier before any other protocolDonatas Abraitis1-1/+1
If e.g. BGP neighbor is using a route-map at the boot, that is not yet created, then the log is spammed with `The route-map 'X' does not exist`. Processing earlier, should do the trick. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>