]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
14 months agotopotests: add an ebgp 6vpe test
Philippe Guibert [Mon, 13 Mar 2023 09:47:16 +0000 (10:47 +0100)]
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>
14 months agoMerge pull request #15426 from idryzhov/bgp-rmap-yang
Donatas Abraitis [Mon, 26 Feb 2024 07:44:20 +0000 (09:44 +0200)]
Merge pull request #15426 from idryzhov/bgp-rmap-yang

bgpd, yang: fix missing mandatory/default statements on some leafs

14 months agobgpd, yang: fix missing mandatory/default statements on some leafs
Igor Ryzhov [Sun, 25 Feb 2024 19:50:41 +0000 (21:50 +0200)]
bgpd, yang: fix missing mandatory/default statements on some leafs

The code expects these leafs to always exist. If they are not set, the
daemon would crash. CLI always sets them, but we should properly mark
them as mandatory/default to prevent them from being missed when using
the API.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
14 months agoMerge pull request #15423 from idryzhov/fix-nb-choice
Christian Hopps [Sun, 25 Feb 2024 21:54:16 +0000 (16:54 -0500)]
Merge pull request #15423 from idryzhov/fix-nb-choice

lib: fix processing of choices in northbound

14 months agotests: add test for required choice/np-container callbacks
Christian Hopps [Sun, 25 Feb 2024 04:24:05 +0000 (23:24 -0500)]
tests: add test for required choice/np-container callbacks

Signed-off-by: Christian Hopps <chopps@labn.net>
14 months agotests: add test for northbound ordering fix
Christian Hopps [Sun, 25 Feb 2024 02:39:30 +0000 (21:39 -0500)]
tests: add test for northbound ordering fix

Signed-off-by: Christian Hopps <chopps@labn.net>
14 months agolib: fix nb callbacks for containers inside choice case
Igor Ryzhov [Fri, 23 Feb 2024 22:06:41 +0000 (00:06 +0200)]
lib: fix nb callbacks for containers inside choice case

Containers inside a choice's case must be treated as presence containers
as they can be explicitly created and deleted. They must have `create`
and `destroy` callbacks, otherwise the internal data they represent may
never be deleted.

The issue can be reproduced with the following steps:
- create an access-list with destination-network params
  ```
  # access-list test seq 1 permit ip any 10.10.10.0 0.0.0.255
  ```
- delete the `destination-network` container
  ```
  # mgmt delete-config /frr-filter:lib/access-list[name='test'][type='ipv4']/entry[sequence='1']/destination-network
  # mgmt commit apply
  MGMTD: No changes found to be committed!
  ```

As the `destination-network` container is non-presence, and all its
leafs are mandatory, mgmtd doesn't see any changes to be commited and
simply updates its YANG data tree without passing any updates to backend
daemons.

This commit fixes the issue by requiring `create` and `destroy`
callbacks for containers inside choice's cases.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
14 months agolib: fix order of northbound operations
Igor Ryzhov [Fri, 23 Feb 2024 19:14:26 +0000 (21:14 +0200)]
lib: fix order of northbound operations

When ordering operations, destroys must always come before other
operations, to correctly cover the change of a "case" in a "choice".

The problem can be reproduced with the following commands:
```
access-list test seq 1 permit 10.0.0.0/8
access-list test seq 1 permit host 10.0.0.1
access-list test seq 1 permit 10.0.0.0/8
```

Before this commit, the order of changes would be the following:
- `access-list test seq 1 permit 10.0.0.0/8`
  - `modify` for `ipv4-prefix`
- `access-list test seq 1 permit host 10.0.0.1`
  - `destroy` for `ipv4-prefix`
  - `modify` for `host`
- `access-list test seq 1 permit 10.0.0.0/8`
  - `modify` for `ipv4-prefix`
  - `destroy` for `host`

As `destroy` for `host` is called last, it rewrites the fields that were
filled by `modify` callback of `ipv4-prefix`. This commit fixes this
problem by always calling `destroy` callbacks first.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
14 months agoMerge pull request #15421 from idryzhov/fix-fe-client-notify
Christian Hopps [Fri, 23 Feb 2024 21:29:25 +0000 (16:29 -0500)]
Merge pull request #15421 from idryzhov/fix-fe-client-notify

lib: fix processing of notifications on mgmt fe client

14 months agolib: fix processing of notifications on mgmt fe client
Igor Ryzhov [Fri, 23 Feb 2024 16:53:46 +0000 (18:53 +0200)]
lib: fix processing of notifications on mgmt fe client

Notifications are sent by mgmtd for each session of a client, so they
should be processed once per each session.

Also, add session_id parameter to an async_notification callback as all
other callbacks have this parameter.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
14 months agoMerge pull request #15405 from LabNConsulting/chopps/fix-fe-client
Donald Sharp [Fri, 23 Feb 2024 14:47:46 +0000 (09:47 -0500)]
Merge pull request #15405 from LabNConsulting/chopps/fix-fe-client

tests: use more standard name for python3

14 months agoMerge pull request #15410 from louis-6wind/optim-nhflags
Donatas Abraitis [Fri, 23 Feb 2024 08:18:15 +0000 (10:18 +0200)]
Merge pull request #15410 from louis-6wind/optim-nhflags

bgpd: move mp_nexthop_prefer_global boolean attribute to nh_flags

14 months agoMerge pull request #15406 from donaldsharp/evpn_mh_fix
Donatas Abraitis [Fri, 23 Feb 2024 08:04:50 +0000 (10:04 +0200)]
Merge pull request #15406 from donaldsharp/evpn_mh_fix

tests: bgp_evpn_mh timing issue fix

14 months agoMerge pull request #15384 from louis-6wind/isis-show-all-algos
Donatas Abraitis [Fri, 23 Feb 2024 07:51:13 +0000 (09:51 +0200)]
Merge pull request #15384 from louis-6wind/isis-show-all-algos

isisd: display all the algorithms at the same time

14 months agoMerge pull request #15383 from donaldsharp/cpp_evpn_data
Donatas Abraitis [Fri, 23 Feb 2024 07:49:15 +0000 (09:49 +0200)]
Merge pull request #15383 from donaldsharp/cpp_evpn_data

zebra: Remove deprecated items

14 months agoMerge pull request #15409 from sri-mohan1/srib-24-zebra-dpdk-dp
Donald Sharp [Thu, 22 Feb 2024 18:47:30 +0000 (13:47 -0500)]
Merge pull request #15409 from sri-mohan1/srib-24-zebra-dpdk-dp

zebra: changes for code maintainability

14 months agobgpd: move mp_nexthop_prefer_global boolean attribute to nh_flags
Louis Scalbert [Fri, 29 Apr 2022 17:41:57 +0000 (19:41 +0200)]
bgpd: move mp_nexthop_prefer_global boolean attribute to nh_flags

Move mp_nexthop_prefer_global boolean attribute to nh_flags. It does
not currently save memory because of the packing.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
14 months agozebra: changes for code maintainability
sri-mohan1 [Thu, 22 Feb 2024 05:03:47 +0000 (10:33 +0530)]
zebra: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
14 months agotests: bgp_evpn_mh timing issue fix
Donald Sharp [Wed, 21 Feb 2024 23:12:00 +0000 (18:12 -0500)]
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>
14 months agotests: use more standard name for python3
Christian Hopps [Wed, 21 Feb 2024 12:55:54 +0000 (07:55 -0500)]
tests: use more standard name for python3

Signed-off-by: Christian Hopps <chopps@labn.net>
14 months agoMerge pull request #15401 from idryzhov/fix-nb-crash
Christian Hopps [Wed, 21 Feb 2024 05:16:47 +0000 (00:16 -0500)]
Merge pull request #15401 from idryzhov/fix-nb-crash

Fix order of NB callbacks (and a crash)

14 months agolib: fix order of northbound callbacks
Igor Ryzhov [Tue, 20 Feb 2024 20:32:52 +0000 (22:32 +0200)]
lib: fix order of northbound callbacks

When ordering the NB callbacks according to their priorities, if the
operation is "destroy" we should reverse the order, to destroy the
dependants before the dependencies.

This fixes the crash, that can be reproduced with the following steps:
```
frr# conf term file-lock
frr(config)# affinity-map map bit-position 10
frr(config)# interface test
frr(config-if)# link-params
frr(config-link-params)# affinity map
frr(config-link-params)# exit
frr(config-if)# exit
frr(config)# mgmt commit apply
frr(config)# no affinity-map map
frr(config)# interface test
frr(config-if)# link-params
frr(config-link-params)# no affinity map
frr(config-link-params)# exit
frr(config-if)# exit
frr(config)# mgmt commit apply
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
14 months agolib: add missing priority for affinity map callbacks
Igor Ryzhov [Tue, 20 Feb 2024 20:27:29 +0000 (22:27 +0200)]
lib: add missing priority for affinity map callbacks

Other objects depend on affinity-maps being created before them by using
leafref with require-instance true. Set the priority to ensure that.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
14 months agoMerge pull request #15393 from idryzhov/fix-base64
Donald Sharp [Tue, 20 Feb 2024 15:20:28 +0000 (10:20 -0500)]
Merge pull request #15393 from idryzhov/fix-base64

lib: fix base64 encoding

14 months agoMerge pull request #15377 from opensourcerouting/fix/bgpd_evpn_route_map
Russ White [Tue, 20 Feb 2024 15:17:46 +0000 (10:17 -0500)]
Merge pull request #15377 from opensourcerouting/fix/bgpd_evpn_route_map

lib: Do not convert EVPN prefixes into IPv4/IPv6 if not needed

14 months agoMerge pull request #15367 from rampxxxx/ldp_sync_cleanup
Russ White [Tue, 20 Feb 2024 15:15:39 +0000 (10:15 -0500)]
Merge pull request #15367 from rampxxxx/ldp_sync_cleanup

ospfd: fix cli shown in running config when turning off ldp-sync

14 months agoMerge pull request #15366 from cscarpitta/feature/srv6-fpm-pb-extension
Russ White [Tue, 20 Feb 2024 15:14:56 +0000 (10:14 -0500)]
Merge pull request #15366 from cscarpitta/feature/srv6-fpm-pb-extension

fpm: Add support for SRv6 to FPM protobuf

14 months agoMerge pull request #15351 from louis-6wind/fix-leak-vrf-interface
Russ White [Tue, 20 Feb 2024 15:14:20 +0000 (10:14 -0500)]
Merge pull request #15351 from louis-6wind/fix-leak-vrf-interface

bgpd: update route leak after vrf interface changes

14 months agozebra: Remove deprecated items
Donald Sharp [Fri, 16 Feb 2024 04:42:46 +0000 (23:42 -0500)]
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>
14 months agoMerge pull request #15394 from sri-mohan1/srib-24-babel
Donald Sharp [Tue, 20 Feb 2024 12:02:59 +0000 (07:02 -0500)]
Merge pull request #15394 from sri-mohan1/srib-24-babel

babeld: changes for code maintainability

14 months agobabeld: changes for code maintainability
sri-mohan1 [Mon, 19 Feb 2024 18:32:50 +0000 (00:02 +0530)]
babeld: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
14 months agoMerge pull request #15381 from LabNConsulting/chopps/nb-notif
Igor Ryzhov [Mon, 19 Feb 2024 14:52:47 +0000 (16:52 +0200)]
Merge pull request #15381 from LabNConsulting/chopps/nb-notif

lib: mgmtd: add xpath arg to YANG notification message

14 months agolib: fix base64 encoding
Igor Ryzhov [Mon, 19 Feb 2024 13:35:22 +0000 (15:35 +0200)]
lib: fix base64 encoding

Remove adding of line feeds when encondig. We're using these functions
only for encoding binary data for storing in YANG data tree.

According to RFC 7950, section 9.8.2:
```
9.8.2.  Lexical Representation

   Binary values are encoded with the base64 encoding scheme (see
   Section 4 in [RFC4648]).
```

According to mentioned RFC 4648, section 3.1:
```
   Implementations MUST NOT add line feeds to base-encoded data unless
   the specification referring to this document explicitly directs base
   encoders to add line feeds after a specific number of characters.
```

Therefore, line feeds must not be added to the encoded data.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
14 months agoMerge pull request #15389 from opensourcerouting/fix/add_mgmtd_pytest_marker
Christian Hopps [Mon, 19 Feb 2024 11:36:15 +0000 (06:36 -0500)]
Merge pull request #15389 from opensourcerouting/fix/add_mgmtd_pytest_marker

doc: Add `mgmtd` pytest marker into documentation

14 months agodoc: show isis optional algorithm id
Louis Scalbert [Mon, 19 Feb 2024 09:13:51 +0000 (10:13 +0100)]
doc: show isis optional algorithm id

Set optional algorithm ID in the show isis commands.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
14 months agoisisd: make algorithm id optional in show isis commands
Philippe Guibert [Thu, 15 Dec 2022 08:28:19 +0000 (09:28 +0100)]
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>
14 months agoisisd: show isis route .. json adds the algorithm value
Philippe Guibert [Mon, 19 Dec 2022 14:39:00 +0000 (15:39 +0100)]
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>
14 months agoisisd: make optional algorithm id in 'show isis route'
Philippe Guibert [Thu, 15 Dec 2022 08:26:45 +0000 (09:26 +0100)]
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>
14 months agolib: mgmtd: add xpath arg to notification message
Christian Hopps [Wed, 14 Feb 2024 15:04:11 +0000 (10:04 -0500)]
lib: mgmtd: add xpath arg to notification message

Signed-off-by: Christian Hopps <chopps@labn.net>
14 months agofpm: Add func to encode SRv6 SIDs in protobuf
Carmine Scarpitta [Tue, 13 Feb 2024 10:48:11 +0000 (11:48 +0100)]
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>
14 months agofpm: Add functions to encode nexthop in protobuf
Carmine Scarpitta [Tue, 13 Feb 2024 10:40:49 +0000 (11:40 +0100)]
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>
14 months agofpm: Add SRv6 VPN SIDs to `fpm.proto`
Carmine Scarpitta [Tue, 13 Feb 2024 11:12:34 +0000 (12:12 +0100)]
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>
14 months agofpm: Add SRv6 Local SIDs to `fpm.proto`
Carmine Scarpitta [Tue, 13 Feb 2024 09:29:34 +0000 (10:29 +0100)]
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>
14 months agoMerge pull request #15357 from dpward/master
Donatas Abraitis [Sun, 18 Feb 2024 12:43:21 +0000 (14:43 +0200)]
Merge pull request #15357 from dpward/master

github: Replace issue template with issue form

14 months agodoc: Add `mgmtd` pytest marker into documentation
Donatas Abraitis [Sat, 17 Feb 2024 09:24:29 +0000 (11:24 +0200)]
doc: Add `mgmtd` pytest marker into documentation

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
14 months agoMerge pull request #15376 from sri-mohan1/srib-24-babel
Donatas Abraitis [Fri, 16 Feb 2024 20:29:06 +0000 (22:29 +0200)]
Merge pull request #15376 from sri-mohan1/srib-24-babel

babeld: changes for code maintainability

14 months agoMerge pull request #15378 from idryzhov/ospf-suppress-fa
Donald Sharp [Fri, 16 Feb 2024 12:26:24 +0000 (07:26 -0500)]
Merge pull request #15378 from idryzhov/ospf-suppress-fa

tests: fix ospf_suppress_fa timing issue

14 months agoMerge pull request #15382 from donaldsharp/more_sa_failures
Igor Ryzhov [Fri, 16 Feb 2024 11:55:35 +0000 (13:55 +0200)]
Merge pull request #15382 from donaldsharp/more_sa_failures

More sa failures

14 months agobgpd: Fix value stored to group never being read
Donald Sharp [Fri, 16 Feb 2024 04:28:18 +0000 (23:28 -0500)]
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>
14 months agoospfd: Fix assignment with never being used
Donald Sharp [Fri, 16 Feb 2024 04:27:38 +0000 (23:27 -0500)]
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>
14 months agolib: always call new notification hooks too
Christian Hopps [Mon, 12 Feb 2024 18:03:32 +0000 (13:03 -0500)]
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>
14 months agoMerge pull request #15371 from LabNConsulting/chopps/mgmtd-fixes
Igor Ryzhov [Thu, 15 Feb 2024 18:02:23 +0000 (20:02 +0200)]
Merge pull request #15371 from LabNConsulting/chopps/mgmtd-fixes

Fixes for the northbound/mgmtd

14 months agotests: fix ospf_suppress_fa timing issue
Igor Ryzhov [Thu, 15 Feb 2024 13:35:24 +0000 (15:35 +0200)]
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>
14 months agolib: actually create the tree for the conversion
Christian Hopps [Wed, 14 Feb 2024 22:32:04 +0000 (17:32 -0500)]
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>
14 months agolib: fix memleak on success
Christian Hopps [Wed, 14 Feb 2024 22:31:12 +0000 (17:31 -0500)]
lib: fix memleak on success

Signed-off-by: Christian Hopps <chopps@labn.net>
14 months agotests: Check if multiple route-map match clauses works for EVPN prefixes
Donatas Abraitis [Thu, 15 Feb 2024 10:19:43 +0000 (12:19 +0200)]
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>
14 months agolib: Do not convert EVPN prefixes into IPv4/IPv6 if not needed
Donatas Abraitis [Thu, 15 Feb 2024 10:07:43 +0000 (12:07 +0200)]
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>
14 months agogithub: Replace issue template with issue form
David Ward [Mon, 12 Feb 2024 11:30:26 +0000 (06:30 -0500)]
github: Replace issue template with issue form

Signed-off-by: David Ward <david.ward@gatech.edu>
14 months agotests: check route leak update after vrf creation and deletion
Louis Scalbert [Fri, 9 Feb 2024 15:28:18 +0000 (16:28 +0100)]
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>
14 months agobgpd: update route leak when vrf appears
Louis Scalbert [Fri, 9 Feb 2024 15:28:23 +0000 (16:28 +0100)]
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>
14 months agotests: check route leak after changing vrf state
Louis Scalbert [Fri, 9 Feb 2024 14:47:40 +0000 (15:47 +0100)]
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>
14 months agobgpd: update route leak when vrf state changes
Louis Scalbert [Tue, 26 Apr 2022 14:57:45 +0000 (16:57 +0200)]
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>
14 months agotests: use check_ping in bgp_vrf_route_leak_basic
Louis Scalbert [Wed, 14 Feb 2024 15:35:51 +0000 (16:35 +0100)]
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>
14 months agotests: add source_addr in check_ping
Louis Scalbert [Wed, 14 Feb 2024 15:32:13 +0000 (16:32 +0100)]
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>
14 months agotests: fix duplicates in bgp_vrf_route_leak_basic
Louis Scalbert [Fri, 9 Feb 2024 14:55:47 +0000 (15:55 +0100)]
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>
14 months agoMerge pull request #15332 from donaldsharp/nhg_stuffs
Donatas Abraitis [Wed, 14 Feb 2024 14:14:19 +0000 (16:14 +0200)]
Merge pull request #15332 from donaldsharp/nhg_stuffs

Nhg stuffs

14 months agoMerge pull request #15288 from donaldsharp/shell_access_removal
Donatas Abraitis [Wed, 14 Feb 2024 09:20:36 +0000 (11:20 +0200)]
Merge pull request #15288 from donaldsharp/shell_access_removal

vtysh: Remove deprecated shell_access code

14 months agoMerge pull request #15359 from LabNConsulting/chopps/reap-unused-phase
Igor Ryzhov [Wed, 14 Feb 2024 09:15:06 +0000 (11:15 +0200)]
Merge pull request #15359 from LabNConsulting/chopps/reap-unused-phase

mgmtd: remove unused commit phase SEND_CFG

14 months agobuild: FRR 10.1 development version frr-10.0-dev
Donatas Abraitis [Tue, 13 Feb 2024 19:18:45 +0000 (21:18 +0200)]
build: FRR 10.1 development version

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
14 months agobabeld: changes for code maintainability
sri-mohan1 [Tue, 13 Feb 2024 18:30:31 +0000 (00:00 +0530)]
babeld: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
14 months agoMerge pull request #15234 from opensourcerouting/snmp-topotest-fixes base_10.0
Donald Sharp [Tue, 13 Feb 2024 15:59:30 +0000 (10:59 -0500)]
Merge pull request #15234 from opensourcerouting/snmp-topotest-fixes

topotests: fix snmptrap log OID parsing

14 months agoospfd: fix cli shown in running config when turning off ldp-sync
lynnemorrison [Tue, 13 Feb 2024 15:20:11 +0000 (10:20 -0500)]
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>
14 months agoMerge pull request #15320 from donaldsharp/vtysh_limit_fds
Russ White [Tue, 13 Feb 2024 14:50:00 +0000 (09:50 -0500)]
Merge pull request #15320 from donaldsharp/vtysh_limit_fds

lib, ospfclient, vtysh: Allow for a minimum fd poll size

14 months agoMerge pull request #15284 from opensourcerouting/feature/bgpd_announce_rpki_state_knob
Russ White [Tue, 13 Feb 2024 14:35:10 +0000 (09:35 -0500)]
Merge pull request #15284 from opensourcerouting/feature/bgpd_announce_rpki_state_knob

bgpd: Add neighbor X send-community extended rpki command

14 months agoMerge pull request #15042 from Orange-OpenSource/ospf-te
Christian Hopps [Tue, 13 Feb 2024 10:37:29 +0000 (05:37 -0500)]
Merge pull request #15042 from Orange-OpenSource/ospf-te

ospfd: Add Opaque LSA decoder for json output

14 months agoMerge pull request #15361 from idryzhov/fix-be-interested
Christian Hopps [Tue, 13 Feb 2024 01:11:20 +0000 (20:11 -0500)]
Merge pull request #15361 from idryzhov/fix-be-interested

mgmtd: fix be_is_client_interested

14 months agoMerge pull request #15352 from louis-6wind/fix-leak-recursive
Donatas Abraitis [Mon, 12 Feb 2024 19:42:03 +0000 (21:42 +0200)]
Merge pull request #15352 from louis-6wind/fix-leak-recursive

bgpd: fix route recursion on leaked routes

14 months agomgmtd: fix be_is_client_interested
Igor Ryzhov [Mon, 12 Feb 2024 18:34:33 +0000 (20:34 +0200)]
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>
14 months agoMerge pull request #15358 from LabNConsulting/chopps/doc-update
Igor Ryzhov [Mon, 12 Feb 2024 17:52:35 +0000 (19:52 +0200)]
Merge pull request #15358 from LabNConsulting/chopps/doc-update

update doc with new more strict protobuf requirements

14 months agotests: adapt ospfapiclient test to new json output
Olivier Dugeon [Thu, 21 Dec 2023 21:12:59 +0000 (22:12 +0100)]
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>
14 months agoospfd: Decode Extended Link & Prefix TLVs for json
Olivier Dugeon [Tue, 19 Dec 2023 15:00:25 +0000 (16:00 +0100)]
ospfd: Decode Extended Link & Prefix TLVs for json

When dumping ospf database with json output, decode Extended Link and Extended
Prefix TLVs and sub-TLVs.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
14 months agoospfd: Decode Router Info. TLVs for json output
Olivier Dugeon [Tue, 19 Dec 2023 14:59:33 +0000 (15:59 +0100)]
ospfd: Decode Router Info. TLVs for json output

When dumping ospf database with json output, decode Router Information TLVs
and sub-TLVs.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
14 months agoospfd: Decode TE TLVs for json output
Olivier Dugeon [Tue, 19 Dec 2023 14:57:49 +0000 (15:57 +0100)]
ospfd: Decode TE TLVs for json output

When dumping ospf database with json output, decode Traffic Engineering TLVs
and sub-TLVs.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
14 months agoospfd: Prepare Opaque LSA for json output
Olivier Dugeon [Tue, 19 Dec 2023 14:56:12 +0000 (15:56 +0100)]
ospfd: Prepare Opaque LSA for json output

Instead of output bulk of data with json output, prepare json context to decode
opaque TLVs and sub-TLVs.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
14 months agomgmtd: remove unused commit phase SEND_CFG
Christian Hopps [Thu, 8 Feb 2024 15:30:42 +0000 (10:30 -0500)]
mgmtd: remove unused commit phase SEND_CFG

Signed-off-by: Christian Hopps <chopps@labn.net>
14 months agotests: fix grpc test
Christian Hopps [Mon, 12 Feb 2024 12:48:50 +0000 (07:48 -0500)]
tests: fix grpc test

Signed-off-by: Christian Hopps <chopps@labn.net>
14 months agodoc: docker: update with new more strict protobuf requirements
Christian Hopps [Mon, 12 Feb 2024 11:48:12 +0000 (06:48 -0500)]
doc: docker: update with new more strict protobuf requirements

Signed-off-by: Christian Hopps <chopps@labn.net>
14 months agoMerge pull request #15355 from idryzhov/fix-mgmtd-notif
Christian Hopps [Mon, 12 Feb 2024 11:17:38 +0000 (06:17 -0500)]
Merge pull request #15355 from idryzhov/fix-mgmtd-notif

Fix and rework YANG notifications

14 months agoMerge pull request #15346 from opensourcerouting/fix/memory_optimizations
Donald Sharp [Mon, 12 Feb 2024 02:33:44 +0000 (21:33 -0500)]
Merge pull request #15346 from opensourcerouting/fix/memory_optimizations

Some more memory optimizations

14 months agoMerge pull request #15356 from idryzhov/configure-sysconfdir
Donald Sharp [Mon, 12 Feb 2024 02:33:00 +0000 (21:33 -0500)]
Merge pull request #15356 from idryzhov/configure-sysconfdir

build: fix configure output

14 months agoMerge pull request #15347 from askorichenko/test-bgp-ttl
Donatas Abraitis [Sun, 11 Feb 2024 20:12:32 +0000 (22:12 +0200)]
Merge pull request #15347 from askorichenko/test-bgp-ttl

bgpd: fix minttl copying during peer reset

14 months agobuild: fix configure output
Igor Ryzhov [Sat, 10 Feb 2024 22:53:06 +0000 (00:53 +0200)]
build: fix configure output

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
14 months agolib, mgmtd: rework processing of yang notifications
Igor Ryzhov [Sat, 10 Feb 2024 00:11:13 +0000 (02:11 +0200)]
lib, mgmtd: rework processing of yang notifications

Currently, YANG notification processing is done using a special type of
callbacks registered in backend clients. In this commit, we start using
regular northbound infrastructure instead, because it already has a
convenient way of registering xpath-specific callbacks without the need
for creating additional structures for each necessary notification. We
also now pass a notification data to the callback, instead of a plain
JSON. This allows to use regular YANG library functions for inspecting
notification fields, instead of manually parsing the JSON.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
14 months agoMerge pull request #15354 from cscarpitta/fix/fpm-pb-add-missing-include
Donald Sharp [Sun, 11 Feb 2024 01:52:47 +0000 (20:52 -0500)]
Merge pull request #15354 from cscarpitta/fix/fpm-pb-add-missing-include

qpb: Add missing `#include nexthop.h`

14 months agoqpb: Add missing `#include nexthop.h`
Carmine Scarpitta [Fri, 9 Feb 2024 23:44:50 +0000 (00:44 +0100)]
qpb: Add missing `#include nexthop.h`

In `qpb.h` we have a bunch of functions that make use of
`union g_addr`. `union g_addr` is defined in `nexthop.h`, which
actually is NOT included in `qpb.h`.

Let's add the missing `#include nexthop.h`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
14 months agoMerge pull request #15353 from vjardin/yang_converted
Igor Ryzhov [Fri, 9 Feb 2024 23:27:23 +0000 (01:27 +0200)]
Merge pull request #15353 from vjardin/yang_converted

mgmtd: ripng, libs fully converted

14 months agolib, mgmtd: fix processing of yang notifications
Igor Ryzhov [Fri, 9 Feb 2024 22:58:49 +0000 (00:58 +0200)]
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>
14 months agomgmtd: ripng, libs fully converted
Vincent JARDIN [Fri, 9 Feb 2024 18:18:48 +0000 (19:18 +0100)]
mgmtd: ripng, libs fully converted

While checking the code, we can notice that they are already converted.

Suggested-by: Igor Ryzhov <iryzhov@nfware.com>
Signed-off-by: Vincent Jardin <vjardin@free.fr>
14 months agobgpd: fix route recursion on leaked routes
Louis Scalbert [Tue, 26 Apr 2022 14:45:42 +0000 (16:45 +0200)]
bgpd: fix route recursion on leaked routes

Leaked recursive routes are not resolved.

> VRF r1-cust1:
> B>  5.1.0.0/24 [200/98] via 99.0.0.1 (recursive), weight 1, 00:00:08
>  *                       via 192.168.1.2, r1-eth4, weight 1, 00:00:08
> B>* 99.0.0.1/32 [200/0] via 192.168.1.2, r1-eth4, weight 1, 00:00:08

> VRF r1-cust4:
> B   5.1.0.0/24 [20/98] via 99.0.0.1 (vrf r1-cust1) inactive, weight 1, 00:00:08
> B>* 99.0.0.1/32 [20/0] via 192.168.1.2, r1-eth4 (vrf r1-cust1), weight 1, 00:00:08

When announcing the routes to zebra, use the peer of the ultimate bgp
path info instead of the one of the first parent path info to determine
whether the route is recursive.

The result is:
> VRF r1-cust4:
> B>  5.1.0.0/24 [20/98] via 99.0.0.1 (vrf r1-cust1) (recursive), weight 1, 00:00:02
>   *                      via 192.168.1.2, r1-eth4 (vrf r1-cust1), weight 1, 00:00:02
> B>* 99.0.0.1/32 [20/0] via 192.168.1.2, r1-eth4 (vrf r1-cust1), weight 1, 00:00:02

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
14 months agotests: check route recursion on leaked routes
Louis Scalbert [Fri, 9 Feb 2024 17:04:34 +0000 (18:04 +0100)]
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>