summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* *: fix `frr_daemon_info` indentationDavid Lamparter2024-01-2720-126/+209
| | | | | | | | | | clang-format doesn't understand FRR_DAEMON_INFO is a long macro where laying out items semantically makes sense. (Also use only one `FRR_DAEMON_INFO(` in isisd so editors don't get confused with the mismatching `( ( )`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: create `frr_daemon_state_{load,save}`David Lamparter2024-01-273-0/+164
| | | | | | | | | | | These functions load daemon-specific persistent state from `/var/lib/frr` and supersede open-coded variants of similar calls in ospfd, ospf6d and isisd to save GR state and/or sequence numbers. Unlike the open-coded variants, the save call correctly `fsync()`s the saved data to ensure disk contents are consistent. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: set up `frr_libstatedir`David Lamparter2024-01-276-0/+14
| | | | | | | This needs to be used for persistent state, which currently is misplaced into `/var/run` / `/run` where it gets deleted across reboots. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: nuke `LDPD_SOCKET`David Lamparter2024-01-273-23/+11
| | | | | | This just unnecessarily complicates things by involving autoconf. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: nuke `ZEBRA_SERV_PATH`David Lamparter2024-01-273-8/+8
| | | | | | This just unnecessarily complicates things by involving autoconf. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: nuke `BFDD_CONTROL_SOCKET`David Lamparter2024-01-275-12/+8
| | | | | | This just unnecessarily complicates things by involving autoconf. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib, mgmtd: fix wrong mgmtd socket pathsDavid Lamparter2024-01-276-10/+24
| | | | | | These paths were ignoring the `-N` namespacing option. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: rename `frr_vtydir` to `frr_runstatedir`David Lamparter2024-01-276-26/+18
| | | | | | Also remove frr_init_vtydir(), just initialize to default. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: update packaging & docs for dir changesDavid Lamparter2024-01-2725-66/+65
| | | | | | | `--sysconfdir` and `--localstatedir` now align with general autoconf practices. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: untangle sysconfdir & localstatedirDavid Lamparter2024-01-2710-64/+113
| | | | | | | | | | | | | | | | | `--sysconfdir` should be `/etc` and `--localstatedir` should be `/var`. The package-specific subdirectory should be added by configure, not given by the user, to match established behavior by other packages. Note that `--bindir`, `--sbindir`, `--libdir` and `--libexecdir` have different established/expected behavior due to distro specific multi-arch support. That's why these are left unchanged. The reason this is getting fixed now is that we need to use `--localstatedir` for its actual value to put things in `/var/lib`. As it is now, being overloaded for `/run`, the configured `/var` path becomes inaccessible. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: use AX_RECURSIVE_EVALDavid Lamparter2024-01-271-26/+9
| | | | | | | Replace inline expansion loop. (Also correctly handles prefix=NONE and exec_prefix=NONE inside the macro.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: add recursion limit for AX_RECURSIVE_EVALDavid Lamparter2024-01-271-31/+6
| | | | | | The autoconf version can just loop forever, abort instead. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: add ax_recursive_eval.m4David Lamparter2024-01-272-0/+57
| | | | | | | As found in the GNU autoconf archive https://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge pull request #15239 from cscarpitta/fix/fix-srv6-topotestsDonatas Abraitis2024-01-272-2/+2
|\ | | | | tests: Fix SRv6 topotest names
| * tests: Rename `test_zebra_seg6local_routes`Carmine Scarpitta2024-01-261-2/+2
| | | | | | | | | | | | | | | | | | The name of the `test_zebra_seg6local_routes` test is wrong. The goal of this test is to verify seg6 routes (not seg6local routes). Let's put the correct name. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
| * tests: Rename `test_srv6_locator.py`Carmine Scarpitta2024-01-261-0/+0
| | | | | | | | | | | | It was copied, but we forgot to rename it. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
* | Merge pull request #15240 from LabNConsulting/chopps/convert-ripngdIgor Ryzhov2024-01-2720-88/+186
|\ \ | | | | | | ripngd: convert ripngd to mgmtd
| * | ripngd: convert ripngd to mgmtdChristian Hopps2024-01-2620-88/+186
|/ / | | | | | | | | | | - a couple small fixes for ripd conversion as well. Signed-off-by: Christian Hopps <chopps@labn.net>
* | Merge pull request #15220 from LabNConsulting/chopps/ripd-convertIgor Ryzhov2024-01-2632-379/+663
|\ \ | | | | | | ripd to mgmtd
| * | ripd: ripd convert to mgmtdChristian Hopps2024-01-2618-99/+232
| | | | | | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
| * | mgmtd: fix commit request overwriteIgor Ryzhov2024-01-264-33/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are places, where we can receive an existing commit transaction. If we don't check that the request already exists, it gets overwritten and we start having problems with transaction refcounters. Forbid having multiple configuration sessions simultaneously. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
| * | mgmtd: fix memleakIgor Ryzhov2024-01-261-0/+1
| | | | | | | | | | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
| * | mgmtd: cleanup txn without schedulingIgor Ryzhov2024-01-261-26/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the transaction is not cleaned up immediately, it can be still referenced by some threds. If it's a commit thread and it's executed before the actual cleanup, mgmtd crashes because of the missing commit_cfg_req. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
| * | mgmtd: fix log typeIgor Ryzhov2024-01-261-1/+1
| | | | | | | | | | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
| * | mgmtd: fix sending the same value to multiple clientsIgor Ryzhov2024-01-261-1/+0
| | | | | | | | | | | | | | | | | | | | | The value should not be cleared after sending it to the first client, otherwise other clients receive an empty string. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
| * | lib: fix removing access/prefix listsIgor Ryzhov2024-01-261-177/+80
| | | | | | | | | | | | | | | | | | | | | | | | CLI for access/prefix list removal was using `nb_cli_apply_changes` multiple times in the same command. It's fine for regular daemons but not for mgmtd. Refactor the code to apply changes only once. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
| * | lib: add yang function for counting data nodesIgor Ryzhov2024-01-262-0/+39
| | | | | | | | | | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
| * | lib: convert filters to mgmtdChristian Hopps2024-01-267-8/+60
| | | | | | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
| * | lib: convert route-map to mgmtdChristian Hopps2024-01-268-12/+79
| | | | | | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
| * | doc: updates to mgmtd conversion documentationChristian Hopps2024-01-261-22/+150
| | | | | | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* | | Merge pull request #15237 from donaldsharp/sharp_watch_neighbors_moreDonatas Abraitis2024-01-263-6/+8
|\ \ \ | |_|/ |/| | sharpd: Add ability to turn off watching of redistribution
| * | sharpd: Add ability to turn off watching of redistributionDonald Sharp2024-01-263-6/+8
|/ / | | | | | | | | | | | | | | Wanted to do some testing of redistribute without having to restart sharpd over and over. Added ability to turn off the `sharp watch redistribute XX` functionality. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | Merge pull request #15233 from louis-6wind/bgp-leak-no-networkDonatas Abraitis2024-01-265-6/+48
|\ \ | | | | | | bgpd: fix VRF leaking with 'no bgp network import-check'
| * | topotests: vpnv4 route leaking with no import-checkLouis Scalbert2024-01-254-5/+35
| | | | | | | | | | | | | | | | | | Test vpnv4 route leaking with no import-check Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * | bgpd: fix VRF leaking with 'no bgp network import-check'Louis Scalbert2024-01-251-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BGP static routes are defined using the network statement, e.g.: > router bgp XXX > address-family ipv4 unicast > network 192.168.0.0/24 When "no bgp network import-check" is set, it is impossible to successfully import the static routes into the BGP VPN table. The prefix is present in the table but is not marked as valid. This issue applies regardless of whether or not routes are present in the router's RIB. Always mark as valid the nexthops of BGP static routes when "no bgp network import-check" is set. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com> Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | | Merge pull request #15224 from donaldsharp/selected_fibDonatas Abraitis2024-01-251-4/+2
|\ \ \ | | | | | | | | zebra: Cleanup dest assignment
| * | | zebra: Cleanup dest assignmentDonald Sharp2024-01-241-4/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | dest was shadowing dest inside of an if statement additionally both legs needed dest to be assigned. Let's clean this up a slight bit and use it appropriately Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | Merge pull request #15223 from ↵Donald Sharp2024-01-252-37/+37
|\ \ \ | | | | | | | | | | | | | | | | opensourcerouting/fix/bgp_peer_cap_uint32_to_uint64 bgpd: Increase peer's struct cap from uint32 to uint64
| * | | bgpd: Increase peer's struct cap from uint32 to uint64Donatas Abraitis2024-01-242-37/+37
| |/ / | | | | | | | | | | | | | | | Approaching the limits of uint32. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* | | Merge pull request #15206 from routingrocks/rajesh/pbr_mapDonatas Abraitis2024-01-251-1/+9
|\ \ \ | | | | | | | | pbrd: Fix PBR handling for last rule deletion
| * | | pbrd: Fix PBR handling for last rule deletionRajesh Varatharaj2024-01-231-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: Previously, the PBR common was updated for every rule update or deletion example: let say we have three rule 11, 12, 13 and if we are removing rule 12. in the current code we are making the entire map "valid" to false. pbr-map MAP1 seq 11 match src-ip 90.1.1.2/32 set nexthop 20.1.1.2 swp1 pbr-map MAP1 seq 12 match src-ip 90.1.1.3/32 set nexthop 20.1.1.2 swp1 pbr-map MAP1 seq 13 match src-ip 90.1.1.4/32 set nexthop 20.1.1.2 swp1 no pbr-map MAP1 seq 12 ==> turns whole map valid to false. r1(config)# end r1# show pbr map pbr-map MAP1 valid: no Seq: 11 rule: 310 Installed: yes Reason: Valid SRC IP Match: 90.1.1.2/32 nexthop 20.1.1.2 swp1 Installed: yes Tableid: 10002 Seq: 13 rule: 312 Installed: yes Reason: Valid SRC IP Match: 90.1.1.4/32 nexthop 20.1.1.2 swp1 Installed: yes Tableid: 10004 Fix: Now, the PBR common will only be updated when the last rule is being deleted. This change ensures that we only send a delete request to Zebra once, and only set the valid and installed flags to false when the last rule is deleted. This optimizes the handling of PBR rules and reduces unnecessary interactions with Zebra Testing: UT in MR notes Ticket: # Signed-off-by: Rajesh Varatharaj <rvaratharaj@nvidia.com>
* | | | Merge pull request #15215 from donaldsharp/pceplib_fixupDonatas Abraitis2024-01-259-117/+114
|\ \ \ \ | | | | | | | | | | Compile issue fixups
| * | | | bgpd: Fix printf formatter mistakeDonald Sharp2024-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | | | pceplib: Fix code not building properlyDonald Sharp2024-01-248-116/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The series of pceplib tests are not being run at the moment due to them not even building. Apparently adding the `libcunit1` debian package is enough to get them to build in our system. While weird, let's get this building at least for people that have this and `--enable-werror` turned on. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | | | Merge pull request #15221 from mjstapp/log_immed_configDonatas Abraitis2024-01-253-3/+11
|\ \ \ \ \ | | | | | | | | | | | | lib: add log immediate-mode to running config output
| * | | | | lib: add log immediate-mode to running config outputMark Stapp2024-01-243-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The immediate-mode config wasn't in the running config output; add it. Signed-off-by: Mark Stapp <mjs@labn.net>
* | | | | | Merge pull request #15226 from donaldsharp/nhg_debugsDonatas Abraitis2024-01-251-25/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | Nhg debugs
| * | | | | | zebra: Remove debugs for retrieving a new nhg idDonald Sharp2024-01-251-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not complicated code and if zebra is allocating a new one. Zebra does not need to inform the operator about the process during debugs. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | | | | | zebra: Combine 2 debugs into 1 for NHG DetailDonald Sharp2024-01-251-11/+6
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When debugging NHG detail there is a whole bunch of lines surrounding the nexthop group. Let's clean these up since they are extremely chatty and spawn several lines. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | | | | Merge pull request #15227 from donaldsharp/f_strdupDonatas Abraitis2024-01-253-116/+86
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Some fixes