summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #15168 from mjstapp/daemon_logsDonatas Abraitis2024-01-197-12/+93
|\ | | | | lib,vtysh: add per-daemon log file config
| * doc: add doc for daemon-specific log cliMark Stapp2024-01-181-0/+14
| | | | | | | | | | | | Add doc for the daemon-specific log file cli Signed-off-by: Mark Stapp <mjs@labn.net>
| * lib,vtysh: add per-daemon log file configMark Stapp2024-01-176-12/+79
| | | | | | | | | | | | | | | | 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>
* | Merge pull request #15172 from donaldsharp/evpn_mh_bridge_fixJafar Al-Gharaibeh2024-01-181-1/+1
|\ \ | | | | | | tests: Fix test_evpn_mh.py to correctly call bridge program
| * | tests: Fix test_evpn_mh.py to correctly call bridge programDonald Sharp2024-01-181-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #15166 from LabNConsulting/chopps/fix-munetDonatas Abraitis2024-01-181-4/+1
|\ \ | | | | | | tests: fix munet accessing missing attribute
| * | tests: fix munet accessing missing attributeChristian Hopps2024-01-171-4/+1
| | | | | | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* | | Merge pull request #15162 from opensourcerouting/fix/aspath4_set_flagDonald Sharp2024-01-173-13/+16
|\ \ \ | |/ / |/| | bgpd: Set capability received flag only after sanity checks
| * | tests: Adopt tests for AS4 handlingDonatas Abraitis2024-01-162-5/+6
| | | | | | | | | | | | | | | | | | | | | 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>
| * | bgpd: Send notification if AS4 capability failed to parse (malformed)Donatas Abraitis2024-01-161-1/+1
| | | | | | | | | | | | Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
| * | bgpd: Set role capability received flag only if parsed correctlyDonatas Abraitis2024-01-161-1/+3
| | | | | | | | | | | | | | | | | | If we receive a malformed packet, we might end-up with a bad state. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
| * | bgpd: Set hostname capability received flag only if parsed correctlyDonatas Abraitis2024-01-161-2/+2
| | | | | | | | | | | | | | | | | | If we receive a malformed packet, we might end-up with a bad state. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
| * | bgpd: Set ADD-PATH capability received flag only if parsed correctlyDonatas Abraitis2024-01-161-2/+2
| | | | | | | | | | | | | | | | | | If we receive a malformed packet, we might end-up with a bad state. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
| * | bgpd: Set AS4 capability received flag only if parsed correctlyDonatas Abraitis2024-01-161-2/+2
| | | | | | | | | | | | | | | | | | If we receive a malformed packet, we might end-up with a bad state. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* | | Merge pull request #15160 from vjardin/doc_typoDonatas Abraitis2024-01-162-2/+2
|\ \ \ | | | | | | | | doc: typo, fix end of line
| * | | doc: typo, fix end of lineVincent Jardin2024-01-152-2/+2
| |/ / | | | | | | | | | Signed-off-by: Vincent Jardin <vjardin@free.fr>
* | | Merge pull request #15161 from LabNConsulting/chopps/munet-0-13-12Donatas Abraitis2024-01-163-10/+28
|\ \ \ | | | | | | | | import munet 0.13.12
| * | | tests: import munet 0.13.12Christian Hopps2024-01-152-9/+25
| | | | | | | | | | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
| * | | tests: set environment variable munet 0.13.12 will useChristian Hopps2024-01-151-1/+3
|/ / / | | | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* | | Merge pull request #15154 from idryzhov/mgmt-get-dataChristian Hopps2024-01-1527-56/+287
|\ \ \ | | | | | | | | mgmtd get-data request expansion
| * | | tests: add tests for mgmt get-data exact node requestIgor Ryzhov2024-01-153-0/+35
| | | | | | | | | | | | | | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
| * | | lib, mgmtd: add ability to request the exact node in get-data requestIgor Ryzhov2024-01-153-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | RESTCONF expects to receive the exact node as a result, not the whole data tree. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
| * | | lib: fix oper data leaf creationIgor Ryzhov2024-01-151-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | tests: add tests for mgmt get-data with configIgor Ryzhov2024-01-156-3/+69
| | | | | | | | | | | | | | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
| * | | lib, mgmtd: add ability to set content type in get-data requestIgor Ryzhov2024-01-159-15/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | lib, mgmtd: add separate get-data request for the frontendIgor Ryzhov2024-01-148-23/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | vtysh, mgmtd: send interface commands to mgmtdIgor Ryzhov2024-01-142-2/+5
| | | | | | | | | | | | | | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
| * | | mgmtd: add option to specify netns as the vrf backendIgor Ryzhov2024-01-146-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | lib: fix yang_lyd_trim_xpathIgor Ryzhov2024-01-141-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | We should traverse all top-level siblings, not only the first one. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* | | | Merge pull request #15156 from LabNConsulting/chopps/yang-mtu-32Donatas Abraitis2024-01-152-5/+6
|\ \ \ \ | | | | | | | | | | yang: lib: interface MTUs can be larger than uint16
| * | | | yang: lib: interface MTUs can be larger than uint16Christian Hopps2024-01-142-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Merge pull request #15034 from louis-6wind/topotest-rpkiDonatas Abraitis2024-01-1521-30/+999
|\ \ \ \ \ | |_|_|/ / |/| | | | bgpd, topotests: add bgp_rpki_topo1 and RPKI fixes
| * | | | bgpd: fix debug rpki display in show runPhilippe Guibert2024-01-111-8/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only include "debug rpki" in "show run" if it was requested from the configure mode but not it was from the enabled mode. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * | | | bgpd: add hooks for displaying module debug messagesPhilippe Guibert2024-01-112-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when a plugin is attached, some debugs may be attached to that plugin. For that, add one hook that is interacting with vty: a boolean indicates what the usage is for: either for impacting the 'show running-config', or for impacting the 'show debugging' command. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * | | | doc: add show rpki configurationLouis Scalbert2024-01-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add documentation about the new "show rpki configuration" command. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * | | | bgpd: do not show default rpki timers in show runPhilippe Guibert2024-01-111-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "show run" displays the default RPKI timers when at least one cache server is configured. Only display the RPKI timers that differs from the default values. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * | | | bgpd: remove double spaces with rpki running config & sshPhilippe Guibert2024-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove double spaces when doing show running-config. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * | | | bgpd: fix resetting rpki timer at no rpkiLouis Scalbert2024-01-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RPKI configuration is not totally flushed when doing "no rpki". Timers remains to default values. > r2# sh run bgpd > [...] > rpki > rpki retry_interval 5 > rpki cache 192.0.2.1 15432 preference 1 > exit > [...] > r2# conf t > r2(config)# no rpki > r2(config)# do sh run > [...] > rpki > rpki retry_interval 5 > exit Reset the timers after doing "no rpki" Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * | | | bgpd: fix crash when re-adding a rpki serverLouis Scalbert2024-01-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a crash when re-adding a rpki server: > r2# sh run bgpd > [...] > rpki > rpki retry_interval 5 > rpki cache 192.0.2.1 15432 preference 1 > exit > [...] > r2# conf t > r2(config)# rpki > r2(config-rpki)# no rpki cache 192.0.2.1 15432 preference 1 > r2(config-rpki)# do show rpki cache-connection > Cannot find a connected group. > r2(config-rpki)# rpki cache 192.0.2.1 15432 preference 1 > r2(config-rpki)# do show rpki cache-connection > vtysh: error reading from bgpd: Resource temporarily unavailable (11)Warning: closing connection to bgpd because of an I/O error! > #0 raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50 > #1 0x00007f3fd2d16e57 in core_handler (signo=11, siginfo=0x7ffffd5931b0, context=0x7ffffd593080) at lib/sigevent.c:246 > #2 <signal handler called> > #3 0x00007f3fd26926b4 in tommy_list_head (list=0x2e322e302e323931) at /home/lscalber/git/rtrlib/./third-party/tommyds/tommylist.h:125 > #4 0x00007f3fd2693812 in rtr_mgr_get_first_group (config=0x55fbf31d7f00) at /home/lscalber/git/rtrlib/rtrlib/rtr_mgr.c:409 > #5 0x00007f3fd2ebef59 in get_connected_group () at bgpd/bgp_rpki.c:718 > #6 0x00007f3fd2ec0b39 in show_rpki_cache_connection_magic (self=0x7f3fd2ec69c0 <show_rpki_cache_connection_cmd>, vty=0x55fbf31f9ef0, argc=3, argv=0x55fbf31f99d0, uj=0x0) > # at bgpd/bgp_rpki.c:1575 > #7 0x00007f3fd2ebd4da in show_rpki_cache_connection (self=0x7f3fd2ec69c0 <show_rpki_cache_connection_cmd>, vty=0x55fbf31f9ef0, argc=3, argv=0x55fbf31f99d0) at ./bgpd/bgp_rpki_clippy.c:648 > #8 0x00007f3fd2c8a142 in cmd_execute_command_real (vline=0x55fbf31f9990, vty=0x55fbf31f9ef0, cmd=0x0, up_level=0) at lib/command.c:978 > #9 0x00007f3fd2c8a25c in cmd_execute_command (vline=0x55fbf31e5260, vty=0x55fbf31f9ef0, cmd=0x0, vtysh=0) at lib/command.c:1028 > #10 0x00007f3fd2c8a7f1 in cmd_execute (vty=0x55fbf31f9ef0, cmd=0x55fbf3200680 "do show rpki cache-connection ", matched=0x0, vtysh=0) at lib/command.c:1203 > #11 0x00007f3fd2d36548 in vty_command (vty=0x55fbf31f9ef0, buf=0x55fbf3200680 "do show rpki cache-connection ") at lib/vty.c:594 > #12 0x00007f3fd2d382e1 in vty_execute (vty=0x55fbf31f9ef0) at lib/vty.c:1357 > #13 0x00007f3fd2d3a519 in vtysh_read (thread=0x7ffffd5963c0) at lib/vty.c:2365 > #14 0x00007f3fd2d2faf6 in event_call (thread=0x7ffffd5963c0) at lib/event.c:1974 > #15 0x00007f3fd2cc238e in frr_run (master=0x55fbf2a0cd60) at lib/libfrr.c:1214 > #16 0x000055fbf073de40 in main (argc=9, argv=0x7ffffd596618) at bgpd/bgp_main.c:510 Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * | | | topotests: bgp_rpki_topo1, failure on error packetLouis Scalbert2024-01-112-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | topotests: log bgp_rpki_topo1 pyrtr outputLouis Scalbert2024-01-112-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Log bgp_rpki_topo1 pyrtr output Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * | | | topotests: add bgp_rpki_topo1Louis Scalbert2024-01-1117-0/+808
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | bgpd: fix rpki compilation without rtrlib sshLouis Scalbert2024-01-111-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix RPKI module compilation when rtrlib is compiled without SSH support, ie. with cmake option: > -D RTRLIB_TRANSPORT_SSH=No > bgpd/bgp_rpki.c: In function ‘config_write’: > bgpd/bgp_rpki.c:1062:3: error: enumeration value ‘SSH’ not handled in switch [-Werror=switch-enum] > 1062 | switch (cache->type) { > | ^~~~~~ > bgpd/bgp_rpki.c: In function ‘show_rpki_cache_connection_magic’: > bgpd/bgp_rpki.c:1598:3: error: enumeration value ‘SSH’ not handled in switch [-Werror=switch-enum] > 1598 | switch (cache->type) { > | ^~~~~~ > cc1: all warnings being treated as errors Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * | | | bgpd: add json error message to rpkiLouis Scalbert2024-01-111-20/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add error messages to rpki JSON output instead of an empty JSON. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * | | | bgpd: fix show rpki json void outputLouis Scalbert2024-01-111-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "show rpki XX json" should not return a void output because json.loads() considers it to be an incorrect JSON. > >>> json.loads("") > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib/python3.9/json/__init__.py", line 346, in loads > return _default_decoder.decode(s) > File "/usr/lib/python3.9/json/decoder.py", line 337, in decode > obj, end = self.raw_decode(s, idx=_w(s, 0).end()) > File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode > raise JSONDecodeError("Expecting value", s, err.value) from None > json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) > >>> json.loads("{}") > {} Return "{}" instead in such a case. Link: https://github.com/FRRouting/frr/pull/15034 Fixes: dff41cc8a9 ("bgpd: Add JSON output for `show rpki prefix` and other show commands") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* | | | | Merge pull request #15150 from LabNConsulting/chopps/config-file-integratedDonatas Abraitis2024-01-1520-102/+89
|\ \ \ \ \ | |_|_|/ / |/| | | | doc: update config file doc for integrated requirement
| * | | | doc: update config file doc for integrated requirementChristian Hopps2024-01-1320-102/+89
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* | | | | Merge pull request #15151 from idryzhov/mgmtd-vrfChristian Hopps2024-01-141-51/+2
|\ \ \ \ \ | |_|_|/ / |/| | | | mgmtd: remove full vrf initialization
| * | | | mgmtd: remove full vrf initializationIgor Ryzhov2024-01-131-51/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't really need full VRF infrastructure in mgmtd. We only need to register vty commands. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* | | | | Merge pull request #15152 from LabNConsulting/chopps/doc-mgmtd-convert-updateDonald Sharp2024-01-143-90/+119
|\ \ \ \ \ | | | | | | | | | | | | doc: mgmtd: update mgmtd conversion doc to be current.