Commit Graph

34980 Commits

Author SHA1 Message Date
Louis Scalbert
21e542e2c6 doc: show isis optional algorithm id
Set optional algorithm ID in the show isis commands.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-19 10:13:51 +01:00
Philippe Guibert
f93b08f4a0 isisd: make algorithm id optional in show isis commands
The following two isis commands have now the algorithm id
optional:

> # show isis segment-routing node algorithm
> # show isis topology algorithm

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-19 10:10:54 +01:00
Philippe Guibert
4d63d8cd62 isisd: show isis route .. json adds the algorithm value
When walking over all the flex-algorithm routes, it is
difficult to know which route is associated to which
algorithm: add "algorithm" attribute to the json object.

Output example:

> ubuntu2004(config-router)# do show isis route algorithm  json
> [
>   {
>     "area":"1",
>     "algorithm":128,
>     "level-1":{
>      ]
>    },
>    "level-2":{
>      "area":"1"
>    },
>    "vrf_id":0
>  },
>  {
>    "area":"1",
>    "algorithm":129,
>    "level-1":{
>      "area":"1",

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-19 10:10:54 +01:00
Philippe Guibert
88e368b4dc isisd: make optional algorithm id in 'show isis route'
To avoid calling for each algorithm the 'show isis route'
command, the algorithm id is optional. The below command
will dump the routes for all the algorithms:

> show isis route algorithm

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-19 10:10:54 +01: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
Carmine Scarpitta
154bce3d9c fpm: Add func to encode SRv6 SIDs in protobuf
Add a bunch of helper functions to support encoding of SRv6 SIDs in
protobuf.

Specifically,
* `fpm_srv6_sid_format_create`: encode SID format information into a
protobuf `SRv6SIDFormat` structure
* `fpm_srv6_local_sid_*_behavior_create` functions: encode an SRv6 SID
behavior and associated attributes into a protobuf
`Fpm__SRv6LocalSID__*` structure

This is a preliminary commit to support sending SRv6 Local SIDs and VPN
SIDs via protobuf.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-02-18 18:31:13 +01:00
Carmine Scarpitta
b1f1cb9c23 fpm: Add functions to encode nexthop in protobuf
Add two helper functions to encode/decode nexthops in protobuf.

Specifically,
* `fpm_nexthop_create`: encode a `struct nexthop` in a protobuf nexthop
structure
* `fpm_nexthop_get`: decode a nexthop protobuf structure into a `struct
nexthop`

This is a preliminary commit to support sending SRv6 Local SIDs and VPN
SIDs via protobuf.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-02-18 18:31:13 +01:00
Carmine Scarpitta
4ec8ef5098 fpm: Add SRv6 VPN SIDs to fpm.proto
Add two optional fields to the AddRoute protobuf message to support
SRv6 VPN use cases:
* `srv6_vpn_sid`: used to associate an SRv6 VPN SID to a route; if
present, the router will steer the traffic that matches the prefix by
encapsulating the payload in an outer IPv6 header where the destination
address is the SRv6 VPN SID provided
* `srv6_encap_source_address`: source Address of outer encapsulating
IPv6 header

This is a preliminary commit to support sending SRv6 Local SIDs and VPN
SIDs via protobuf.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-02-18 18:31:13 +01:00
Carmine Scarpitta
7052c94ba3 fpm: Add SRv6 Local SIDs to fpm.proto
Add several protobuf messages to support the installation and removal
of SRv6 Local SIDs via FPM protobuf.

This is a preliminary commit to support sending SRv6 Local SIDs and VPN
SIDs via protobuf.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-02-18 18:31:13 +01:00
Donatas Abraitis
311eac53e8
Merge pull request #15357 from dpward/master
github: Replace issue template with issue form
2024-02-18 14:43:21 +02:00
Donatas Abraitis
ce334222ae doc: Add mgmtd pytest marker into documentation
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-17 11:24:29 +02:00
Donatas Abraitis
c872610f7d
Merge pull request #15376 from sri-mohan1/srib-24-babel
babeld: changes for code maintainability
2024-02-16 22:29:06 +02:00
Donald Sharp
9aec0d5a18
Merge pull request #15378 from idryzhov/ospf-suppress-fa
tests: fix ospf_suppress_fa timing issue
2024-02-16 07:26:24 -05:00
Igor Ryzhov
cb570d87d0
Merge pull request #15382 from donaldsharp/more_sa_failures
More sa failures
2024-02-16 13:55:35 +02:00
Donald Sharp
863e6ddf11 bgpd: Fix value stored to group never being read
SA Reports:

bgpd/bgp_rpki.c:1085:24: warning: Value stored to 'group' during its initialization is never read [deadcode.DeadStores]
        struct rtr_mgr_group *group = get_connected_group(rpki_vrf);
                              ^~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-02-15 23:28:18 -05:00
Donald Sharp
0f7b5fcffb ospfd: Fix assignment with never being used
SA finds this:

error	14-Feb-2024 14:52:24	ospfd/ospf_te.c:3962:2: warning: Value stored to 'sub' is never read [deadcode.DeadStores]
error	14-Feb-2024 14:52:24	        sub = 0;
error	14-Feb-2024 14:52:24	        ^     ~
error	14-Feb-2024 14:52:24	1 warning generated.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-02-15 23:27:38 -05:00
Christian Hopps
1d4ea437e4 lib: always call new notification hooks too
- call the new notification hooks when backends call the old notification
posting API.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-15 13:03:25 -05:00
Igor Ryzhov
fa67c0b91c
Merge pull request #15371 from LabNConsulting/chopps/mgmtd-fixes
Fixes for the northbound/mgmtd
2024-02-15 20:02:23 +02: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
Christian Hopps
dff28248c3 lib: actually create the tree for the conversion
Before this fix would always return empty results b/c there was no
libyang tree to print to output format.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-15 06:13:08 -05:00
Christian Hopps
b8e07049a8 lib: fix memleak on success
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-15 06:13:08 -05: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
Donatas Abraitis
439b739495 lib: Do not convert EVPN prefixes into IPv4/IPv6 if not needed
Convert only when this is really needed, e.g. `match ip address prefix-list ...`.

Otherwise, we can't have mixed match clauses, like:

```
match ip address prefix-list p1
match evpn route-type prefix
```

This won't work, because the prefix is already converted, and we can't extract
route type, vni, etc. from the original EVPN prefix.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-15 12:07:43 +02:00
David Ward
16308917a2 github: Replace issue template with issue form
Signed-off-by: David Ward <david.ward@gatech.edu>
2024-02-15 03:16:54 -05: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
94d12dc490 bgpd: update route leak when vrf appears
If the VRF is not yet created and a BGP instance is created for the
VRF, dependent leaked routes are inactive, which is normal. However,
when the VRF interface appears, they remains inactive.

Update route leak when a VRF interface appears. Note that routes to a
deleted VRF are already removed by zebra.

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
b45c5cd959 bgpd: update route leak when vrf state changes
Locally leaked routes remain active after the nexthop VRF interface goes
down.

Update route leaking when the loopback or a VRF interface state change is
received from zebra.

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
Donatas Abraitis
2fd5e51d4c
Merge pull request #15332 from donaldsharp/nhg_stuffs
Nhg stuffs
2024-02-14 16:14:19 +02:00
Donatas Abraitis
4952f23cee
Merge pull request #15288 from donaldsharp/shell_access_removal
vtysh: Remove deprecated shell_access code
2024-02-14 11:20:36 +02:00
Igor Ryzhov
cccfedb345
Merge pull request #15359 from LabNConsulting/chopps/reap-unused-phase
mgmtd: remove unused commit phase SEND_CFG
2024-02-14 11:15:06 +02:00
Donatas Abraitis
d5bec7b081 build: FRR 10.1 development version
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-13 21:18:45 +02:00
sri-mohan1
21b7f32a2c babeld: changes for code maintainability
these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2024-02-14 00:00:31 +05:30
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
lynnemorrison
5d5ac73b67 ospfd: fix cli shown in running config when turning off ldp-sync
LDP-Sync is automatically enabled on interfaces when turned on in
router ospf context.   The user can remove ldp-sync from running
on an interface, by issuing a "no ip ospd mpls ldp-sync" command.
To remove all ldp-sync interface commands the user must delete
ldp-sync at the router level.  The code was not correctly removing
the config.   This PR fixes that issue.   Now the extra cli
ldp-sync commands are removed when ldp-sync is disabled.

Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
2024-02-13 10:20:11 -05:00
Donatas Abraitis
72f0e06824 bgpd: Implement Paths-Limit capability
https://datatracker.ietf.org/doc/html/draft-abraitis-idr-addpath-paths-limit

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-13 17:07:15 +02: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
Donatas Abraitis
6e96c98bc4 doc: Add neighbor ... addpath-rx-paths-limit command
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-13 17:06:04 +02:00
Donatas Abraitis
13c5d0e708 bgpd: Do not send dynamic capability if both peers do not have it exchanged
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-13 17:06:04 +02:00
Russ White
e74c3b0746
Merge pull request #15320 from donaldsharp/vtysh_limit_fds
lib, ospfclient, vtysh: Allow for a minimum fd poll size
2024-02-13 09:50:00 -05: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
Christian Hopps
60cb834ead
Merge pull request #15361 from idryzhov/fix-be-interested
mgmtd: fix be_is_client_interested
2024-02-12 20:11:20 -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
Igor Ryzhov
745a2bd8b3 mgmtd: fix be_is_client_interested
Backend "subscribe" API allows daemons to dynamically register xpaths
they are interested in. Such xpaths are not stored in hardcoded
config/oper xpath arrays so this function fails to understand that a
backend daemon is interested in them. Fix by using dynamic xpath maps
instead which store both hardcoded and dynamic xpaths.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-12 20:55:34 +02:00
Igor Ryzhov
24ca4f408b
Merge pull request #15358 from LabNConsulting/chopps/doc-update
update doc with new more strict protobuf requirements
2024-02-12 19:52:35 +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