Commit Graph

3454 Commits

Author SHA1 Message Date
Donatas Abraitis
c357942069
Merge pull request #14775 from adrianomarto/test_ospfd_single_switch2
tests: multiple OSPF routers connected to a single switch
2024-02-29 10:36:54 +02:00
Donatas Abraitis
df98e88368
Merge pull request #15368 from louis-6wind/fix-6pe
bgpd: fix 6vpe nexthop
2024-02-28 11:34:43 +02:00
Russ White
c4f9b874b7
Merge pull request #14810 from dmytroshytyi-6WIND/srv6_bgp_sid_reachability
SRv6 BGP SID reachability
2024-02-27 10:32:14 -05:00
Russ White
879ca714ed
Merge pull request #15273 from opensourcerouting/feature/paths_limit_capability
bgpd: Implement Paths-Limit capability
2024-02-27 10:24:05 -05:00
Francois Dumontet
324fa21015 tests: extend tests for aspath exclude
adding a tests about:
"no bgp as-path access-list" command.

the folloxing "clear bgp *" command leads to the
crash exhibited above.

a sleep had been added to capture the crash befor the end of scenario.

50	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f5f05cbb9c0 (LWP 1371086))]
(gdb) bt
    context=0x7ffcf2c216c0) at lib/sigevent.c:248
    acl_list=0x55c976ec03c0) at bgpd/bgp_aspath.c:1688
    dummy=0x7ffcf2c22340, object=0x7ffcf2c21e70) at bgpd/bgp_routemap.c:2401
    match_object=0x7ffcf2c21e70, set_object=0x7ffcf2c21e70, pref=0x0)
    at lib/routemap.c:2687
    attr=0x7ffcf2c220b0, afi=AFI_IP, safi=SAFI_UNICAST, rmap_name=0x0, label=0x0,
    num_labels=0, dest=0x55c976ebeaf0) at bgpd/bgp_route.c:1807
    addpath_id=0, attr=0x7ffcf2c22450, afi=AFI_IP, safi=SAFI_UNICAST, type=10,
    sub_type=0, prd=0x0, label=0x0, num_labels=0, soft_reconfig=0, evpn=0x0)
    at bgpd/bgp_route.c:4424
    packet=0x7ffcf2c22410) at bgpd/bgp_route.c:6266
    packet=0x7ffcf2c22410, mp_withdraw=false) at bgpd/bgp_packet.c:341
    peer=0x55c976e89ed0, size=43) at bgpd/bgp_packet.c:2414
    at bgpd/bgp_packet.c:3899

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2024-02-26 14:58:54 +01:00
Philippe Guibert
4d7df91752 topotests: add an ebgp 6vpe test
This test uses the connected ipv4 mapped ipv6 prefix
to resolve the received BGP routes.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: François Dumontet <francois.dumontet@6wind.com>
2024-02-26 10:16:58 +01:00
Christian Hopps
e5acf6797c tests: add test for required choice/np-container callbacks
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-25 13:48:57 +02:00
Christian Hopps
a37f5f9153 tests: add test for northbound ordering fix
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-25 13:48:57 +02:00
Donald Sharp
eae228c52d
Merge pull request #15405 from LabNConsulting/chopps/fix-fe-client
tests: use more standard name for python3
2024-02-23 09:47:46 -05:00
Donatas Abraitis
3b8c98916a
Merge pull request #15406 from donaldsharp/evpn_mh_fix
tests: bgp_evpn_mh timing issue fix
2024-02-23 10:04:50 +02:00
Donatas Abraitis
5833261e77
Merge pull request #15383 from donaldsharp/cpp_evpn_data
zebra: Remove deprecated items
2024-02-23 09:49:15 +02:00
Donald Sharp
e7f2e2c78c tests: bgp_evpn_mh timing issue fix
This test is failing locally for me 100% of the time
since zebra was converted to mgmtd usage.  The failed
command is:

torm11# show evpn mac vni 1000 mac 00:00:00:00:00:11 json
{
  "00:00:00:00:00:11":{
    "type":"auto",
    "uptime":"00:02:01",
    "localSequence":0,
    "remoteSequence":0,
    "detectionCount":0,
    "isDuplicate":false,
    "syncNeighCount":0,
    "neighbors":{
      "active":[
      ],
      "inactive":[
        "45.0.0.11"
      ]
    }
  }
}

The test is expecting an esi as a key in the output.  Re-arranging
the startup of the tor's before the hosts fixes the issue.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-02-21 18:12:00 -05:00
Christian Hopps
06be54630c tests: use more standard name for python3
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-21 08:05:31 -05:00
Russ White
8dbfc57ec6
Merge pull request #15377 from opensourcerouting/fix/bgpd_evpn_route_map
lib: Do not convert EVPN prefixes into IPv4/IPv6 if not needed
2024-02-20 10:17:46 -05:00
Russ White
ab40199f00
Merge pull request #15351 from louis-6wind/fix-leak-vrf-interface
bgpd: update route leak after vrf interface changes
2024-02-20 10:14:20 -05:00
Donald Sharp
c38ef653f3 zebra: Remove deprecated items
Both zebra_evpn.c and zebra_vxlan.c have items that
were deprecated a year ago.  Let's remove them.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-02-20 07:21:08 -05:00
Igor Ryzhov
5332e447d9
Merge pull request #15381 from LabNConsulting/chopps/nb-notif
lib: mgmtd: add xpath arg to YANG notification message
2024-02-19 16:52:47 +02:00
Christian Hopps
4a93d171c2 lib: mgmtd: add xpath arg to notification message
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-18 18:53:37 -05:00
Igor Ryzhov
829443fd83 tests: fix ospf_suppress_fa timing issue
Set static router-id for OSPF, because otherwise it depends on timing of
router-id updates received from zebra and may differ between test runs.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-15 15:38:26 +02:00
Donatas Abraitis
049a2c0c0a tests: Check if multiple route-map match clauses works for EVPN prefixes
Test prefix-list matching and some other EVPN stuff.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-15 12:19:43 +02:00
Louis Scalbert
1262ee66ad tests: check route leak update after vrf creation and deletion
Ensure that a locally leaked route is updated after a VRF (dis)appears.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-14 16:39:51 +01:00
Louis Scalbert
5709e89f6c tests: check route leak after changing vrf state
Check that local route leaks are set to "inactive" when the VRF
interface is shutdown and, conversely, that they are set to "active"
when the VRF interface is unshut.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-14 16:39:51 +01:00
Louis Scalbert
c102adde30 tests: use check_ping in bgp_vrf_route_leak_basic
Use check_ping in bgp_vrf_route_leak_basic

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-14 16:39:10 +01:00
Louis Scalbert
71e74df14e tests: add source_addr in check_ping
Allow specifying a source_addr in check_ping library function.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-14 16:38:58 +01:00
Louis Scalbert
8b5f6ac982 tests: fix duplicates in bgp_vrf_route_leak_basic
Test functions were duplicated by mistakes. They were identical.

Fixes: 8af61c8a34 ("topotests: test leak from the default vrf")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-14 16:21:35 +01:00
Donald Sharp
9fd7bf4cbb
Merge pull request #15234 from opensourcerouting/snmp-topotest-fixes
topotests: fix snmptrap log OID parsing
2024-02-13 10:59:30 -05:00
Donatas Abraitis
cd7851d99e tests: Check if Paths-Limit capability works
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-13 17:06:04 +02:00
Russ White
17a0a625f0
Merge pull request #15284 from opensourcerouting/feature/bgpd_announce_rpki_state_knob
bgpd: Add neighbor X send-community extended rpki command
2024-02-13 09:35:10 -05:00
Christian Hopps
7b94a923ae
Merge pull request #15042 from Orange-OpenSource/ospf-te
ospfd: Add Opaque LSA decoder for json output
2024-02-13 05:37:29 -05:00
Donatas Abraitis
26faf341ef
Merge pull request #15352 from louis-6wind/fix-leak-recursive
bgpd: fix route recursion on leaked routes
2024-02-12 21:42:03 +02:00
Olivier Dugeon
b46a1fe826 tests: adapt ospfapiclient test to new json output
Following new json decoder for Opaque LSA, this patch adapts the ospfapiclient
test to the new json output.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2024-02-12 17:52:00 +01:00
Christian Hopps
8d6e7a350f tests: fix grpc test
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-12 07:48:50 -05:00
Igor Ryzhov
d94f80fbc4 lib, mgmtd: fix processing of yang notifications
Current code assumes that notification is always sent in stripped JSON
format and therefore notification xpath starts at the third symbol of
notification data. Assuming JSON is more or less fine, because this
representation is internal to FRR, but the assumption about the xpath is
wrong, because it won't work for not top-level notifications. YANG
allows to define notification as a child for some data node deep into
the tree and in this case notification data contains not only the
notification node itself, but also all its parents.

To fix the issue, parse the notification data and get its xpath from its
schema node.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-10 01:00:24 +02:00
Louis Scalbert
1a348ec050 tests: check route recursion on leaked routes
Check that leaks of a route with a recursive nexthop is possible.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-09 18:25:01 +01:00
Donald Sharp
c70af155d2
Merge pull request #15285 from idryzhov/staticd-nexthop-refcounter
staticd: fix nexthop tracking memory leak and add a topotest for VRFs
2024-02-08 15:53:30 -05:00
Donald Sharp
afa07a7f3a
Merge pull request #15255 from louis-6wind/bgp-leak-interface
bgpd: fix interface of routes leaked from another VRF
2024-02-08 11:18:58 -05:00
Donatas Abraitis
f6463dab85 tests: Test if RPKI extended community can be disabled between peers
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-07 22:35:21 +02:00
David Schweizer
1bd96365e4
tests: Reduce wait intervals in test_bgp_snmp_bgp4v2mib
Remove sleep time in test_bgp_snmp_bgp4v2mib before run_and_expect and
reduce wait intervals for faster test convergence.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2024-02-07 13:56:10 +01:00
David Schweizer
961667e34f
topotests: fix snmptrap log OID parsing
Replace OID string parsing of snmptrap log files based on odd/even line
numbers with regex string search to prevent test failures in cases where
log entries don't match assumed order.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2024-02-07 13:56:09 +01:00
Igor Ryzhov
763ce7bb37 tests: add topotest for static routes in VRF
Test how staticd handles VRF creation/deletion.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-06 14:15:37 +02:00
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
Louis Scalbert
8af61c8a34 topotests: test leak from the default vrf
Add tests in bgp_vrf_route_leak_basic topotest to check that route
leaking from the default VRF results in an operational route.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-01 11:46:56 +01: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
Louis Scalbert
eeb9f76588 topotests: test leak from unknown vrf
Add a test in bgp_vrf_route_leak_basic topotest to check that route
leaking from a non existing VRF results in an inactive route.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-01 11:12:43 +01:00
Louis Scalbert
b459f7937e topotests: update bgp_vrf_route_leak_basic
Update bgp_vrf_route_leak_basic to set up the VRF interfaces. Otherwise
the routes to the VRF interface are inactives.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-01 11:11:41 +01:00
Carmine Scarpitta
0fb22f3e9b topotests: update interface in SRv6 topotest
Previously, routes leaked from one VRF to another VRF were associated
with the original nexthop interface.

Due to this change, the `bgp_srv6l3vpn_route_leak` topotest always fails
because it still expects the nexthop interface.

This commit fixes the expected interface name in the
`bgp_srv6l3vpn_route_leak` topotest.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-01 10:21:43 +01:00
Louis Scalbert
60e73903d5 topotests: update ospf_multi_vrf_bgp_route_leak
Leaked connected routes have now the following nexthop interfaces:
- lo for routes imported from the default VRF
- or the VRF interface for routes imported from the other VRFs.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-01 10:21:43 +01:00