Commit graph

34489 commits

Author SHA1 Message Date
David Lamparter 444bc5e237 build: update packaging & docs for dir changes
`--sysconfdir` and `--localstatedir` now align with general autoconf
practices.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-01-27 19:01:19 +01:00
David Lamparter ff62df2e44 build: untangle sysconfdir & localstatedir
`--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>
2024-01-27 19:01:19 +01:00
David Lamparter 27f6171a25 build: use AX_RECURSIVE_EVAL
Replace inline expansion loop.  (Also correctly handles prefix=NONE and
exec_prefix=NONE inside the macro.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-01-27 19:01:19 +01:00
David Lamparter b052b18318 build: add recursion limit for AX_RECURSIVE_EVAL
The autoconf version can just loop forever, abort instead.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-01-27 19:01:19 +01:00
David Lamparter f8eb388b7e build: add ax_recursive_eval.m4
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>
2024-01-27 19:01:19 +01:00
Donatas Abraitis 03fd7d589a
Merge pull request #15239 from cscarpitta/fix/fix-srv6-topotests
tests: Fix SRv6 topotest names
2024-01-27 19:47:28 +02:00
Igor Ryzhov 3f96dcfa86
Merge pull request #15240 from LabNConsulting/chopps/convert-ripngd
ripngd: convert ripngd to mgmtd
2024-01-27 05:42:34 +02:00
Christian Hopps e6eec072ab ripngd: convert ripngd to mgmtd
- a couple small fixes for ripd conversion as well.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-26 17:40:55 -05:00
Igor Ryzhov 1254d5fc4e
Merge pull request #15220 from LabNConsulting/chopps/ripd-convert
ripd to mgmtd
2024-01-26 23:29:59 +02:00
Donatas Abraitis 5db3bb0de9
Merge pull request #15237 from donaldsharp/sharp_watch_neighbors_more
sharpd: Add ability to turn off watching of redistribution
2024-01-26 21:09:30 +02:00
Christian Hopps 83abe9c3cb ripd: ripd convert to mgmtd
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-26 12:34:46 -05:00
Igor Ryzhov d79ca934eb mgmtd: fix commit request overwrite
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>
2024-01-26 12:34:46 -05:00
Igor Ryzhov b92ad5046e mgmtd: fix memleak
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-26 12:34:46 -05:00
Igor Ryzhov 771c8f3b2a mgmtd: cleanup txn without scheduling
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>
2024-01-26 12:34:46 -05:00
Igor Ryzhov 7e27469337 mgmtd: fix log type
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-26 12:34:46 -05:00
Igor Ryzhov 42b815f488 mgmtd: fix sending the same value to multiple clients
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>
2024-01-26 12:34:46 -05:00
Igor Ryzhov 1bf395232d lib: fix removing access/prefix lists
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>
2024-01-26 12:34:23 -05:00
Igor Ryzhov e39b60bac1 lib: add yang function for counting data nodes
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-26 12:34:23 -05:00
Christian Hopps 63ca751c11 lib: convert filters to mgmtd
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-26 12:34:23 -05:00
Christian Hopps dabc92de9e lib: convert route-map to mgmtd
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-26 12:34:23 -05:00
Christian Hopps f7594b55c2 doc: updates to mgmtd conversion documentation
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-26 12:34:23 -05:00
Carmine Scarpitta de8f61e704 tests: Rename test_zebra_seg6local_routes
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>
2024-01-26 18:24:24 +01:00
Carmine Scarpitta 9adde7f318 tests: Rename test_srv6_locator.py
It was copied, but we forgot to rename it.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-01-26 18:23:50 +01:00
Donald Sharp 3d97d2679f sharpd: Add ability to turn off watching of redistribution
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>
2024-01-26 09:26:30 -05:00
Donatas Abraitis d48b99ad4f
Merge pull request #15233 from louis-6wind/bgp-leak-no-network
bgpd: fix VRF leaking with 'no bgp network import-check'
2024-01-26 13:09:33 +02:00
Donatas Abraitis 9b9abe1659
Merge pull request #15224 from donaldsharp/selected_fib
zebra: Cleanup dest assignment
2024-01-25 16:46:32 +02:00
Louis Scalbert 4bbfade7d6 topotests: vpnv4 route leaking with no import-check
Test vpnv4 route leaking with no import-check

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-25 15:12:10 +01:00
Louis Scalbert 45bf46441a bgpd: fix VRF leaking with 'no bgp network import-check'
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>
2024-01-25 15:06:13 +01:00
Donald Sharp 7d7f90a487
Merge pull request #15223 from opensourcerouting/fix/bgp_peer_cap_uint32_to_uint64
bgpd: Increase peer's struct cap from uint32 to uint64
2024-01-25 07:32:36 -05:00
Donatas Abraitis 14c7797b72
Merge pull request #15206 from routingrocks/rajesh/pbr_map
pbrd: Fix PBR handling for last rule deletion
2024-01-25 10:00:19 +02:00
Donatas Abraitis f31bc32196
Merge pull request #15215 from donaldsharp/pceplib_fixup
Compile issue fixups
2024-01-25 09:59:59 +02:00
Donatas Abraitis 147f476fc1
Merge pull request #15221 from mjstapp/log_immed_config
lib: add log immediate-mode to running config output
2024-01-25 09:58:45 +02:00
Donatas Abraitis 0f7577deae
Merge pull request #15226 from donaldsharp/nhg_debugs
Nhg debugs
2024-01-25 09:56:00 +02:00
Donatas Abraitis 4727a976a8
Merge pull request #15227 from donaldsharp/f_strdup
Some fixes
2024-01-25 09:55:07 +02:00
Donald Sharp bae20ff33b pceplib: Fix some new coverity issues that trickled in
Several new issues came in because the coverity build system
was not building the test infrastrucuture for the pceplib.
Now we do, so we fixed it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-01-24 20:20:02 -05:00
Donald Sharp aa474cf7b0 bgpd: Convert free/strdup to XSTRDUP in bgp_rfapi_cfg.c
Lots of usage of free and strdup instead of using
our internal code.  Convert over.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-01-24 19:03:11 -05:00
Donald Sharp 827fb64ecb zebra: Remove debugs for retrieving a new nhg id
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>
2024-01-24 18:29:39 -05:00
Donald Sharp 7a3b6498fc zebra: Combine 2 debugs into 1 for NHG Detail
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>
2024-01-24 18:29:34 -05:00
Donald Sharp 8d5ed65e0d zebra: Cleanup dest assignment
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>
2024-01-24 17:10:45 -05:00
Donatas Abraitis 5298c05bd7 bgpd: Increase peer's struct cap from uint32 to uint64
Approaching the limits of uint32.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-01-24 23:09:52 +02:00
Mark Stapp 2889d0e7a6 lib: add log immediate-mode to running config output
The immediate-mode config wasn't in the running config output;
add it.

Signed-off-by: Mark Stapp <mjs@labn.net>
2024-01-24 13:00:41 -05:00
Donald Sharp a5613bd36d
Merge pull request #15210 from opensourcerouting/fix/use_enum_for_graceful_restart_prints
bgpd: Fix format overflow for graceful-restart debug logs
2024-01-24 12:25:57 -05:00
Donald Sharp c3a66e5082
Merge pull request #15173 from louis-6wind/nhrp-noarp
nhrpd: unset noarp flag using a zapi message
2024-01-24 10:53:29 -05:00
Donald Sharp 16406a31d3
Merge pull request #15196 from idryzhov/nb-leaf-list
lib: remove leaf-list xpath hack from northbound
2024-01-24 10:49:52 -05:00
Donald Sharp 1ea73983fd
Merge pull request #15209 from opensourcerouting/fix/whitespaces
bgpd: Use single whitespace when displaying show bgp summary
2024-01-24 10:48:22 -05:00
Donald Sharp 8754a64da1
Merge pull request #15189 from opensourcerouting/fix/doc_label-table_json
doc: Add missing json keyword for `show debugging label-table`
2024-01-24 10:47:41 -05:00
Donald Sharp e208a7e2cc bgpd: Fix printf formatter mistake
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-01-24 09:11:09 -05:00
Donald Sharp b28eaa1c67 pceplib: Fix code not building properly
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>
2024-01-24 09:07:17 -05:00
Donald Sharp e3e4232102
Merge pull request #15211 from pguibert6WIND/json_compilation_pceplib
pceplib: fix compilation error
2024-01-24 08:50:30 -05:00
Louis Scalbert 6a44127597 nhrpd: remove netlink_configure_arp declaration
Remove the unused netlink_configure_arp() declaration.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-24 10:05:52 +01:00