Commit Graph

3407 Commits

Author SHA1 Message Date
Donatas Abraitis
8629700bc8
Merge pull request #15192 from fdumontet6WIND/capa_nego
bgpd: add [no]neighbor capability fqdn
2024-02-03 12:19:53 +02:00
Francois Dumontet
220c0635a8 tests: improve topotest bgp_dont_capability_negotiate
add some steps for testing of add [no]neighbor capability fqdn
command support.

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2024-02-02 11:31:47 +01:00
Francois Dumontet
e146ea53ef bgpd: add [no]neighbor capability fqdn command
cisco routers are not dealing fairly whith unsupported capabilities.
When a cisco router receive an unsupported capabilities it reset the
negociation without notifying the unmatching capability as described in
RFC2842.
Cisco suggest the use of
neighbor x.x.x.x capability fqdn
to avoid the use of fqdn in open message.

this new command is to remove the use of fqdn capability in the
open message with the peer "x.x.x.x".

Link: https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/116189-problemsolution-technology-00.pdf

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2024-02-02 11:31:47 +01:00
Igor Ryzhov
cb781f6097 staticd: fix NB dependency hack
Currently, staticd configuration is tightly coupled with VRF existence.
Because of that, it has to use a hack in NB infrastructure to create a
VRF configuration when at least one static route is configured for this
VRF. This hack is incompatible with mgmtd, because mgmtd doesn't execute
configuration callbacks. Because of that, the configuration may become
out of sync between mgmtd and staticd. There are two main cases:

1. Create static route in a VRF. The VRF data node will be created
   automatically in staticd by the NB hack, but not in mgmtd.
2. Delete VRF which has some static routes configured. The static route
   configuration will be deleted from staticd by the NB hack, but not
   from mgmtd.

To fix the problem, decouple configuration of static routes from VRF
configuration. Now it is possible to configure static routes even if the
VRF doesn't exist yet. Once the VRF is created, staticd applies all the
preconfigured routes.

This change also fixes the problem with static routes being preserved in
the system when staticd "control-plane-protocol" container is deleted
but the VRF is still configured.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-02 00:57:59 +02:00
Christian Hopps
7521918454 tests: add mgmtd backend notification test
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-01 05:37:59 -05:00
Igor Ryzhov
3afea9ccda tests: add tests for mgmt get-data with-defaults parameter
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-31 02:20:13 +02:00
Igor Ryzhov
642078de8e
Merge pull request #15254 from LabNConsulting/chopps/notifications
Add YANG notifications
2024-01-31 02:18:20 +02:00
Christian Hopps
cb3242f697 tests: add YANG notification test
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-30 14:54:47 -05:00
Donatas Abraitis
9aed5777b7 tests: Check if attributes are reapplied for aggregate routes with route-maps
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-01-30 15:54:04 +02:00
Donatas Abraitis
cd869ebcf2
Merge pull request #15238 from louis-6wind/bgp-leak-network
bgpd: fix VRF leaking with 'network import-check'
2024-01-30 08:21:05 +02:00
Louis Scalbert
fb777555d3 topotests: vpnv4 route leaking with import-check
Test vpnv4 route leaking with import-check

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-29 10:47:00 +01:00
Igor Ryzhov
3900813298 zebra: convert to mgmtd
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov
3625360d88 lib: add support for "features" when loading YANG modules
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov
d9a798e0ad tests: fix test_bgp_recursive_route_ebgp_multi_hop
We shouldn't pass "lo" as an interface to create_interface_in_kernel.
It always exists, and this function flushes all configured IP addresses
from it.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:39 +02:00
David Lamparter
a97d0c5875 lib: set up frr_libstatedir
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>
2024-01-27 19:01:19 +01:00
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
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
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
3cd1c34cb7 topotests: nhrp_topo, test absence of noarp flag
Test the absence the NOARP flag on rX-gre0 interfaces. It is present by
default.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-24 10:05:49 +01:00
Donatas Abraitis
3ab8fc13c1
Merge pull request #15165 from vjardin/ospf_ptmp_unumbered
tests: ospf point-to-multipoint and prefix-suppress
2024-01-23 17:22:28 +02:00
Donatas Abraitis
20ec72d7ca
Merge pull request #15052 from louis-6wind/rpki-vrf-92
bgpd: add VRF support to RPKI
2024-01-22 16:16:34 +02:00
Vincent Jardin
bab32ec8dc tests: ospf point-to-multipoint and suppress
Per the RFC6860, check OSPFv2 using point-to-multipoint
over Ethernet.
Enable the behavior of the RFC6860 using:
  ip ospf prefix-suppress A.B.C.D
See:
  https://www.rfc-editor.org/rfc/rfc6860#section-2.3.2.2

Note that nexthops are not required to assess the checks.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
2024-01-21 21:06:50 +01:00
Donald Sharp
5d608ded25 tests: Fix test_evpn_mh.py to correctly call bridge program
Getting this error:

2024-01-17 19:05:20,688 WARNING: torm11: Router(torm11): proc failed: rc 255 pid 2436134
	args: /usr/bin/nsenter --mount=/proc/2435168/ns/mnt --net=/proc/2435168/ns/net --uts=/proc/2435168/ns/uts -F /bin/bash -c /sbin/bridge vlan add vid 1000 dev bridge
	stdout: RTNETLINK answers: Operation not supported
	stderr: *empty*

As I understand it the correct thing to do here is pass in:
bridge vlan add vid 1000 dev bridge self

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-01-18 10:01:31 -05:00
Louis Scalbert
2b30c4ae92 topotests: add vrf test to bgp_rpki_topo1
Add vrf test to bgp_rpki_topo1

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-18 13:23:42 +01:00
Donatas Abraitis
94178edac3
Merge pull request #15166 from LabNConsulting/chopps/fix-munet
tests: fix munet accessing missing attribute
2024-01-18 09:18:04 +02:00
Donald Sharp
5eb2ddaa10
Merge pull request #15162 from opensourcerouting/fix/aspath4_set_flag
bgpd: Set capability received flag only after sanity checks
2024-01-17 08:19:34 -05:00
Christian Hopps
a197107dbc
tests: fix munet accessing missing attribute
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-17 09:18:21 +00:00
Donatas Abraitis
90254e7bc2 tests: Adopt tests for AS4 handling
When received malformed AS4 capability, it should return -1 (notification send),
and the received flag SHOULD NOT be set.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-01-16 16:28:41 +02:00
Christian Hopps
48ed48b5f9
tests: import munet 0.13.12
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-15 22:43:06 +00:00
Christian Hopps
37f26046f4
tests: set environment variable munet 0.13.12 will use
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-15 22:25:41 +00:00
Christian Hopps
f2bb687426
Merge pull request #15154 from idryzhov/mgmt-get-data
mgmtd get-data request expansion
2024-01-15 07:03:34 -05:00
Donatas Abraitis
563c2cd95c
Merge pull request #15034 from louis-6wind/topotest-rpki
bgpd, topotests: add bgp_rpki_topo1 and RPKI fixes
2024-01-15 11:26:43 +02:00
Igor Ryzhov
2764344bcb tests: add tests for mgmt get-data exact node request
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-15 10:27:33 +02:00
Igor Ryzhov
05c6081099 tests: add tests for mgmt get-data with config
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-15 10:27:33 +02:00
Igor Ryzhov
b507ad54b4 mgmtd: add option to specify netns as the vrf backend
mgmtd has to know if netns is used as the vrf backend to correctly
process interface names in northbound.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-14 20:00:22 +02:00
Igor Ryzhov
883f134921
Merge pull request #15131 from LabNConsulting/chopps/oper-choice-case
Chopps/oper choice case
2024-01-12 00:20:45 +02:00
Donald Sharp
86cbd5831e
Merge pull request #15128 from opensourcerouting/fix/bgp_oad_ECOMMUNITY_ORIGIN_VALIDATION_STATE
bgpd: Recent EBGP-OAD improvements
2024-01-11 09:07:31 -05:00
Christian Hopps
32a4c4019e lib: implement missing YANG choice/case statements.
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-11 13:38:57 +00:00
Louis Scalbert
211249a3b7 topotests: bgp_rpki_topo1, failure on error packet
RPKI FRR module should not send any RPKI error packet during the tests.

Exit rtrd when receiving error packet. Skip tests with errors if rtrd
has stopped.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-11 14:13:46 +01:00
Louis Scalbert
1b3b483342 topotests: log bgp_rpki_topo1 pyrtr output
Log bgp_rpki_topo1 pyrtr output

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-11 14:13:46 +01:00
Louis Scalbert
751500acdb topotests: add bgp_rpki_topo1
Add bgp_rpki_topo1 topotest to validate the RPKI feature. Use a RTR RPKI
server from the above link with a black cleaning.

Link: https://raw.githubusercontent.com/tmshlvck/pyrtr/90df586375396aae08b07069187308b5b7b8823b/pyrtr/__init__.py
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-11 14:13:46 +01:00
Donatas Abraitis
67e8ef293f
Merge pull request #15098 from donaldsharp/lib_zebra_h_cleanup_2
Lib zebra h cleanup 2
2024-01-11 14:50:21 +02:00
Donatas Abraitis
1c491dfbe6 tests: Check if the route over eBGP is preferred when eBGP-OAD is used
If at least one of the candidate routes was received via EBGP, remove from
consideration all routes that were received via EBGP-OAD and IBGP.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-01-11 10:53:57 +02:00
Donatas Abraitis
4c875482a5
Merge pull request #15123 from LabNConsulting/chopps/fix-oper-state-memleak
lib: fix oper-state memleak
2024-01-10 12:16:37 +02:00
Christian Hopps
5519c0fbe6
lib: fix oper-state memleak
Fix memleak when a key-ed query was done for which the key didn't exist.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-09 21:52:41 +00:00
Donald Sharp
c6d94a7056 *: zebra.h should not have fcntl.h
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-01-09 12:50:40 -05:00
Donald Sharp
848dcf3d03 *: remove sys/stat.h from zebra.h
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-01-09 12:39:23 -05:00
Donald Sharp
22b439090c
Merge pull request #15103 from LabNConsulting/chopps/oper-filter
Implement full XPath 1.0 functionality
2024-01-09 12:31:36 -05:00
Donald Sharp
956b6153fe
Merge pull request #15106 from opensourcerouting/fix/rename_thread_cli
vtysh: Add `show event ...` commands
2024-01-08 13:51:36 -05:00