Commit Graph

34362 Commits

Author SHA1 Message Date
Donald Sharp
aa3a108672 doc: Update bgp unnumbered documentation
Mention the limitations of this type of peering
in bgp.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-01-19 13:37:36 -05:00
Christian Hopps
e37f18b780
Merge pull request #15175 from idryzhov/affinity-map-fixes 2024-01-19 08:40:09 -05:00
Donatas Abraitis
2844d093b5
Merge pull request #15168 from mjstapp/daemon_logs
lib,vtysh: add per-daemon log file config
2024-01-19 10:56:15 +02:00
Igor Ryzhov
01be34fa34 zebra: fix default value for affinity-mode
- initialize the necessary bit when creating if_link_params
- fix CLI description to mark extended as the default mode
- correctly set mode to extended when using the "no" form of the command
- handle the "show_defaults" parameter correctly in cli_show callback

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-19 03:47:25 +02:00
Igor Ryzhov
733462a991 zebra: remove unnecessary checks from CLI
First, any data tree validation in CLI handler is not correct, because
this code won't be called when the change is done through any other
frontend. Second, these checks are not necessary at all, because NB
layer handles the change between admin-grp/affinity automatically.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-19 03:47:19 +02:00
Igor Ryzhov
f62e38cc36 zebra: fix link-params admin-grp config output
- it was not printed at all because of the incorrect `yang_dnode_exist`
  check
- the intended output was "admin-group" instead of "admin-grp" used in
  the actual CLI command

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-19 03:47:13 +02:00
Igor Ryzhov
a3bbe28e6d zebra: rework affinity-map update hook
Don't use config tree when updating internal daemon state. Everything
needed is already stored in internal structures.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-19 03:47:11 +02:00
Igor Ryzhov
3856ba2359 lib: make affinity-map value mandatory
There can't be an affinity map without a bit position.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-19 03:47:08 +02:00
Igor Ryzhov
670e0c0737 lib: validate affinity-map bit position using the yang model
When affinity mode is "standard", bit position cannot be greater than
31. Add a "must" statement to the YANG model to validate this, and
remove our custom validation code that does the same.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-19 03:47:05 +02:00
Igor Ryzhov
26bd685a87 lib: make affinity-map value unique in the yang model
It allows us to remove the code that does the same thing manually.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-19 03:47:02 +02:00
Igor Ryzhov
fdd834b8cc lib: validate affinity-map reference using yang model
Change the type of affinity leaf-list in frr-zebra to a leafref with
"require-instance" property set to true. This change tells libyang to
automatically check that affinity-map exists before usage and doesn't
allow it to be deleted if it's referenced. It allows us to remove all
the manual code that is doing the same thing.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-19 03:46:56 +02:00
Jafar Al-Gharaibeh
6103c6251a
Merge pull request #15172 from donaldsharp/evpn_mh_bridge_fix
tests: Fix test_evpn_mh.py to correctly call bridge program
2024-01-18 15:25:48 -06: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
Mark Stapp
c7f7cf9610 doc: add doc for daemon-specific log cli
Add doc for the daemon-specific log file cli

Signed-off-by: Mark Stapp <mjs@labn.net>
2024-01-18 08:30:01 -05: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
Mark Stapp
31015c3ad9 lib,vtysh: add per-daemon log file config
Add a config that specifies per-deamon log file names.
Move the handy generated list of daemon names from vtysh to lib;
edit the gitignore files to match.

Signed-off-by: Mark Stapp <mjs@labn.net>
2024-01-17 16:15:07 -05: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
Donatas Abraitis
02a5da440b bgpd: Send notification if AS4 capability failed to parse (malformed)
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-01-16 15:29:32 +02:00
Donatas Abraitis
722195d4ec bgpd: Set role capability received flag only if parsed correctly
If we receive a malformed packet, we might end-up with a bad state.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-01-16 14:37:51 +02:00
Donatas Abraitis
0c74220c6e bgpd: Set hostname capability received flag only if parsed correctly
If we receive a malformed packet, we might end-up with a bad state.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-01-16 14:37:16 +02:00
Donatas Abraitis
9b178d246e bgpd: Set ADD-PATH capability received flag only if parsed correctly
If we receive a malformed packet, we might end-up with a bad state.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-01-16 14:36:20 +02:00
Donatas Abraitis
b571176aea bgpd: Set AS4 capability received flag only if parsed correctly
If we receive a malformed packet, we might end-up with a bad state.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-01-16 14:35:10 +02:00
Donatas Abraitis
18257b521a
Merge pull request #15160 from vjardin/doc_typo
doc: typo, fix end of line
2024-01-16 09:44:41 +02:00
Donatas Abraitis
9cb45a10d4
Merge pull request #15161 from LabNConsulting/chopps/munet-0-13-12
import munet 0.13.12
2024-01-16 09:44:04 +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
Vincent Jardin
4654995915 doc: typo, fix end of line
Signed-off-by: Vincent Jardin <vjardin@free.fr>
2024-01-15 22:51:09 +01: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
bd9174f424
Merge pull request #15156 from LabNConsulting/chopps/yang-mtu-32
yang: lib: interface MTUs can be larger than uint16
2024-01-15 11:27:15 +02: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
9859f308d2 lib, mgmtd: add ability to request the exact node in get-data request
RESTCONF expects to receive the exact node as a result, not the whole
data tree.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-15 10:27:33 +02:00
Igor Ryzhov
10eac0a54d lib: fix oper data leaf creation
When creating an initial tree trunk for oper data walk, if the xpath
represents a leaf, the leaf is created with an incorrect empty value.
If it doesn't actually exist in daemon's oper data, its value is not
overwritten later and an empty value is returned in the result.

For example, when requesting
`/frr-interface:lib/interface[name='eth0']/description`, the result is:
```
{
  "frr-interface:lib": {
    "interface": [
      {
        "name": "eth0",
        "description": ""
      }
    ]
  }
}
```
instead of an empty JSON that it should be.

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
e1cdb38ee6 lib, mgmtd: add ability to set content type in get-data request
Like in RESTCONF GET request and NETCONF get-data request, make it
possible to request state-only, config-only, or all data.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-15 10:27:33 +02:00
Donatas Abraitis
49cacc3184
Merge pull request #15150 from LabNConsulting/chopps/config-file-integrated
doc: update config file doc for integrated requirement
2024-01-15 08:43:44 +02:00
Igor Ryzhov
25d79af957 lib, mgmtd: add separate get-data request for the frontend
Currently it's the same as get-tree request for the backend, but it is
going to be expanded in the following commits.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-14 20:00:22 +02:00
Igor Ryzhov
88275d392a vtysh, mgmtd: send interface commands to mgmtd
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-14 20:00:22 +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
2b7d9532c8 lib: fix yang_lyd_trim_xpath
We should traverse all top-level siblings, not only the first one.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-14 19:08:15 +02:00
Christian Hopps
d9d5f79610
Merge pull request #15151 from idryzhov/mgmtd-vrf
mgmtd: remove full vrf initialization
2024-01-14 12:04:46 -05:00
Christian Hopps
c68246c069 yang: lib: interface MTUs can be larger than uint16
Technically changing a leaf from uint16 to uint32 is a NBC change; however,
increasing this to uint32 should not break anyone in reality.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-14 12:38:25 +00:00
Donald Sharp
ef0ae6e815
Merge pull request #15152 from LabNConsulting/chopps/doc-mgmtd-convert-update
doc: mgmtd: update mgmtd conversion doc to be current.
2024-01-13 20:46:36 -05:00
Christian Hopps
3b1998061c
doc: update config file doc for integrated requirement
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-13 21:05:36 +00:00
Donatas Abraitis
4eafe41546
Merge pull request #15149 from donaldsharp/pim_vxlan_issues_2
Some code realignment in pim
2024-01-13 21:10:07 +02:00
Donatas Abraitis
fd690b9bc4
Merge pull request #15135 from idryzhov/mgmt-unused
mgmtd: remove unused/redundant variables
2024-01-13 21:08:24 +02:00
Donatas Abraitis
bbe239036a
Merge pull request #15137 from spmzt/master
build: make buildtest.sh BSD compatible
2024-01-13 21:07:25 +02:00
Christian Hopps
a9dc7e9cc0
doc: mgmtd: update mgmtd conversion doc to be current.
Also change `be_client_xpaths` to `be_client_config_xpaths` referred in the doc
to make much clearer it's use (since there's a separate `be_client_oper_xpaths`.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-13 14:26:55 +00:00