summaryrefslogtreecommitdiff
path: root/isisd/isis_cli.c
AgeCommit message (Collapse)Author
2025-01-07Merge pull request #17725 from ↵Russ White
opensourcerouting/fix/full_no_form_for_area-password isisd: Allow full `no` form for `domain-password` and `area-password`
2024-12-26isisd: Allow full `no` form for `domain-password` and `area-password`Donatas Abraitis
Before: ``` LR1.wue3(config)# router isis VyOS LR1.wue3(config-router)# no area-password clear % Unknown command: no area-password clear LR1.wue3(config-router)# no area-password clear foo % Unknown command: no area-password clear foo LR1.wue3(config-router)# ``` Closes https://github.com/FRRouting/frr/issues/17722 Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-25isisd: fix srv6 exit statementsJonathan Voss
Fix missing and misplaced `exit` statements to `show running-config` output. Before: ``` router isis ISIS_CORE [...] segment-routing srv6 locator ISIS_LOC exit <<<<<<< always placed after locator node-msd [...] exit <<<<<<< missng interface dum6 exit ``` After: ``` router isis ISIS_CORE [...] segment-routing srv6 locator ISIS_LOC node-msd [...] exit interface dum6 exit exit ``` Related #16694 Signed-off-by: Jonathan Voss <jvoss@onvox.net>
2024-10-25isisd: fix change flex-algorithm number from uint32 to uint8Philippe Guibert
The algorithm number is encoded on 8 bits and does not require an unsigned 32 bit value to store the value. Fixes: cc4926c1284e ("isisd,yang: add algorithm-prefix-sid configuration tree") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-09-03isisd: Add missing `exit` statementCarmine Scarpitta
Add missing `exit` statement to `show running-config` output. ``` router isis ISIS_CORE is-type level-2-only net 49.0001.0000.0000.0004.00 lsp-mtu 1300 topology ipv6-unicast log-adjacency-changes segment-routing srv6 locator ISIS_LOC exit <<<<<<<<<<<<<<<<<<<<<<<< exit ``` Fixes https://github.com/FRRouting/frr/issues/16694 Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-01-23lib: remove leaf-list xpath hack from northboundIgor Ryzhov
Currently, when editing a leaf-list, `nb_candidate_edit` expects to receive it's xpath without a predicate and the value in a separate argument, and then creates the full xpath. This hack is complicated, because it depends on the operation and on the caller being a backend or not. Instead, let's require to always include the predicate in a leaf-list xpath. Update all the usages in the code accordingly. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2023-11-29lib: all: remove './' from xpath 22% speedupChristian Hopps
fixes #8299 Signed-off-by: Christian Hopps <chopps@labn.net>
2023-09-11isisd: Make SRv6 interface configurableCarmine Scarpitta
Add CLI command and functions to configure the interface used for installing SRv6 SIDs into Linux data plane Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Make SRv6 Node MSDs customizableCarmine Scarpitta
Add CLI commands to customize SRv6 Node MSD values. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Add CLI command to unset SRv6 locatorCarmine Scarpitta
Add a CLI command to unset a previously configured SRv6 locator for a specific IS-IS instance. Example: r1# configure r1(config)# router isis FOO r1(config-router)# segment-routing srv6 r1(config-router-srv6)# no locator loc1 Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Add CLI command to configure SRv6 locatorCarmine Scarpitta
Add a CLI command to configure an SRv6 locator for a specific IS-IS instance. Example: r1# configure r1(config)# router isis FOO r1(config-router)# segment-routing srv6 r1(config-router-srv6)# locator loc1 Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Add nb command to show SRv6 locator infoCarmine Scarpitta
Add a northbound command to show information about the SRv6 locator configured in IS-IS. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04isisd: Add CLI command to disable SRv6Carmine Scarpitta
r1# conf r1(config)# router isis <area-tag> r1(config-router)# no segment-routing srv6 Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04isisd: Add CLI command to enable SRv6Carmine Scarpitta
r1# conf r1(config)# router isis <area-tag> r1(config-router)# segment-routing srv6 Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04isisd: Add nb command to show if SRv6 is enabledCarmine Scarpitta
Add a northbound command to show whether SRv6 is enabled or not. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-07-12isisd: add redistribute table identifier in nb configurationPhilippe Guibert
The yang model does not handle the table identifier in IS-IS. For each redistributed each address family, a new list of table elements is added to store the table identifier to redistribute, and also the optional metric and route-map values for each table identifier. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-04-18isisd: add isis flex-algo configuration frontendHiroki Shirokura
Add the frontend functions for the flex-algo configuration. Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com> Signed-off-by: Eric Kinzie <ekinzie@labn.net> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-04-18lib,vtysh,isisd,yang: algo cli/yang/callbacksHiroki Shirokura
Define the IS-IS flex-algo structure in yang, the CLI configuration commands and the skeletons of frontend and backend functions that are called by the CLI code. Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com> Signed-off-by: Eric Kinzie <ekinzie@labn.net> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-04-18isisd: add cli to configure algorithm-prefix-sidHiroki Shirokura
Add the ability to configure a Segment-Routing prefix SID for a given algorithm. For example: > segment-routing prefix 10.10.10.10/32 algorithm 128 index 100 Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-04-18isisd,yang: add algorithm-prefix-sid configuration treeHiroki Shirokura
Add the ability to configure a Segment-Routing prefix SID for a given algorithm. For example: > segment-routing prefix 10.10.10.10/32 algorithm 128 index 100 Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-04-04isisd: Add log-pdu-drops CLI/YANG supportIsabella de Leon
New config functionality: r1# conf r1(config)# router isis 1 r1(config-router)# log- log-adjacency-changes Log changes in adjacency state log-pdu-drops Log any dropped PDUs r1(config-router)# log-pdu-drops r1(config-router)# end Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2023-03-20Merge pull request #12688 from dorDiogo/isis_hello_padding_sometimesRuss White
isisd: Add support for IS-IS hello padding during-adjacency-formation
2023-02-28isisd: Add advertise-high-metrics CLI/YANG support, modify show outputIsabella de Leon
New config and show functionality: r1# conf r1(config)# router isis 1 r1(config-router)# advertise-high-metrics Advertise high metric value on all interfaces area-password Configure the authentication password for an area ... r1(config-router)# advertise-high-metrics r1(config-router)# end r1# show isis summary ... Area 1: Net: 49.0001.1720.1700.0002.00 TX counters per PDU type: L2 IIH: 1 P2P IIH: 36 LSP RXMT: 0 RX counters per PDU type: Advertise high metrics: Enabled Level-2: ... r1# conf r1(config)# router isis 1 r1(config-router)# no advertise-high-metrics r1(config-router)# end r1# show isis summary ... Area 1: Net: 49.0001.1720.1700.0002.00 TX counters per PDU type: L2 IIH: 1 P2P IIH: 45 LSP RXMT: 0 RX counters per PDU type: Advertise high metrics: Disabled Level-2: ... r1# Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2023-02-28isisd,tests,doc: Rename hello padding sometimes to hello padding ↵Diogo Oliveira
during-adjacency-formation Signed-off-by: Diogo Oliveira <14191454+dorDiogo@users.noreply.github.com>
2023-02-28isisd: Add support for isis hello padding sometimesDiogo Oliveira
New configuration to pad ISIS hello packets during adjacency formation only. Signed-off-by: Diogo Oliveira <14191454+dorDiogo@users.noreply.github.com>
2023-02-22isisd,doc: Add support for isis advertise-passive-onlyDiogo Oliveira
Signed-off-by: Diogo Oliveira <14191454+dorDiogo@users.noreply.github.com>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-01-27*: fix non-const northbound XPath format stringsDavid Lamparter
Passing a pre-formatted buffer in these places needs a `"%s"` in front so it doesn't get formatted twice. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-10-26build, vtysh: extract vtysh commands from .xrefDavid Lamparter
Rather than running selected source files through the preprocessor and a bunch of perl regex'ing to get the list of all DEFUNs, use the data collected in frr.xref. This not only eliminates issues we've been having with preprocessor failures due to nonexistent header files, but is also much faster. Where extract.pl would take 5s, this now finishes in 0.2s. And since this is a non-parallelizable build step towards the end of the build (dependent on a lot of other things being done already), the speedup is actually noticeable. Also files containing CLI no longer need to be listed in `vtysh_scan` since the .xref data covers everything. `#ifndef VTYSH_EXTRACT_PL` checks are equally obsolete. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-09-21isisd: Add set-overload on-startup CLI/YANG supportIsabella de Leon
Before: r1# conf r1(config)# router isis <area-tag> r1(config-router)# set-overload-bit <cr> r1(config-router)# end After: r1# conf r1(config)# router isis <area-tag> r1(config-router)# set-overload-bit <cr> on-startup Set overload bit on startup r1(config-router)# set-overload-bit on-startup (0-86400) Set overload time in seconds r1(config-router)# set-overload-bit on-startup 300 r1(config-router)# end Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2022-07-20isisd: fix prefix-sid last-hop-behaviorLouis Scalbert
The php value is defined in yang but not properly set. Fixes: 8f6c893629 ("isisd: add segment-routing CLI commands") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-06-13*: Use autocomplete for route-maps under commands that require itDonatas Abraitis
For example: ``` donatas-laptop# show bgp ipv4 unicast neighbors 127.0.0.2 advertised-routes route-map ? RMAP_NAME Name of the route map testas2 testas donatas-laptop(config)# router bgp donatas-laptop(config-router)# address-family ipv4 donatas-laptop(config-router-af)# redistribute connected route-map ? RMAP_NAME Pointer to route-map entries testas2 testas donatas-laptop(config-router-af)# network 192.168.0.0/23 route-map ? RMAP_NAME Name of the route map testas2 testas ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-06-02isisd: replace ipv4-unicast with standard in config and oper contextsPhilippe Guibert
Only the multi-topology command can use 'ipv4-unicast' keyword to configure standard topology. The remaining code: dump from show commands, and yang definition, uses 'standard' keyword instead. The test have not been modified. The change would consists in modifying test_fuzz_isis_tlv_tests.h.gz: - replacing ipv4-unicast occurences with standard \x69\x70\x76\x34\x2d\x75\x6e\x69\x63\x61\x73\x74 with \x73\x74\x61\x6e\x64\x61\x72\x64 - align the buffer length by removing 4 bytes per occurence Instead, a specific isis_mtid2str_fake() routing has been put in place in isis_tlvs.c file. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-02-23isisd: Drop deprecated `segment-routing local-block` commandDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-27isisd: remove deprecated commandIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2022-01-18Merge pull request #9938 from Orange-OpenSource/isis_lsRuss White
isisd: Add Link State Traffic Engineering support
2021-12-03isisd: fix running-config for fast-rerouteIgor Ryzhov
YANG leaf means "enable" while CLI command is "disable". So we should use "no" when the leaf is "true", not "false". Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-11-30isisd: Add Link State Traffic Engineering supportOlivier Dugeon
Add Link State TED features to isis_te.c and new CLI to export LS TED and show LS TED to IS-IS. IS-IS LSPs are parse each time a new LSP event occurs in order to update accordingly the Link State Traffic Engineering Database. LS TED could be exported through the ZAPI Opaque message (see sharpd as example). Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2021-11-30isisd: Add support for RFC6119 (IPv6 TE in IS-IS)Olivier Dugeon
- Add advertisement of Global IPv6 address in IIH pdu - Add new CLI to set IPv6 Router ID - Add advertisement of IPv6 Router ID - Correctly advertise IPv6 local and neighbor addresses in Extended IS and MT Reachability TLVs - Correct output of Neighbor IPv6 address in 'show isis database detail' - Manage IPv6 addresses advertisement and corresponiding Adjacency SID when IS-IS is not using Multi-Topology by introducing a new ISIS_MT_DISABLE value for mtid (== 4096 i.e. first reserved flag set to 1) Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2021-11-11Merge pull request #9864 from ton31337/feature/access_list_autocompleteRuss White
lib: Add autocomplete for access-lists
2021-10-31lib: Add autocomplete for access-listsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-30isisd: fix circuit is-type configurationIgor Ryzhov
Currently, we have a lot of checks in CLI and NB layer to prevent incompatible IS-types of circuits and areas. All these checks become completely meaningless when the interface is moved between VRFs. If the area IS-type is different in the new VRF, previously done checks mean nothing and we still end up with incorrect circuit IS type. To actually prevent incorrect IS type, all checks must be done in the processing code. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-30isisd: remove useless checks when configuring passive interfacesIgor Ryzhov
Currently, we have some checks in the CLI and NB layer to "protect" from setting loopback interfaces into non-passive mode. These checks are not correct, because we can not rely on operational data during config reading and validation stage as this data doesn't exist yet. There's nothing wrong in allowing "incorrect" configuration – it is already correctly handled by the actual code. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-30isisd: don't remove interface config when isis router is deletedIgor Ryzhov
In previous releases, it was not possible to configure ISIS on an interfaces without configuring the ISIS router first. Therefore, we had to delete the ISIS config from all interfaces when the router config was deleted. This is fixed since version 8.0 – interface and router configs are completely separate and don't depend on each other, so now we can remove this hack and preserve the interface config when the router config is deleted. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-13lib: northbound cli show/cmd functions must not modify data nodesIgor Ryzhov
To ensure this, add a const modifier to functions' arguments. Would be great do this initially and avoid this large code change, but better late than never. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-05isisd: fix redistribute CLIIgor Ryzhov
Currently, it is possible to configure IPv6 protocols for IPv4 redistribution and vice versa in CLI. The YANG model doesn't allow this so the user receives the following error: ``` nfware(config-router)# redistribute ipv4 ospf6 level-1 % Failed to edit configuration. YANG error(s): Invalid enumeration value "ospf6". Invalid enumeration value "ospf6". Invalid enumeration value "ospf6". YANG path: Schema location /frr-isisd:isis/instance/redistribute/ipv4/protocol. ``` Let's make CLI more user-friendly and allow only supported protocols in redistribution commands. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-08-23*: explicitly print "exit" at the end of every node configIgor Ryzhov
There is a possibility that the same line can be matched as a command in some node and its parent node. In this case, when reading the config, this line is always executed as a command of the child node. For example, with the following config: ``` router ospf network 193.168.0.0/16 area 0 ! mpls ldp discovery hello interval 111 ! ``` Line `mpls ldp` is processed as command `mpls ldp-sync` inside the `router ospf` node. This leads to a complete loss of `mpls ldp` node configuration. To eliminate this issue and all possible similar issues, let's print an explicit "exit" at the end of every node config. This commit also changes indentation for a couple of existing exit commands so that all existing commands are on the same level as their corresponding node-entering commands. Fixes #9206. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-23isisd: fix extra space in the mpls-te config outputIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-02Merge pull request #8210 from LabNConsulting/chopps/always-batchDonald Sharp
northbound: KISS always batch yang config, it's faster.
2021-06-02northbound: KISS always batch yang config (file read), it's fasterChristian Hopps
The backoff code assumed that yang operations always completed quickly. It checked for > 100 YANG modeled commands happening in under 1 second to enable batching. If 100 yang modeled commands always take longer than 1 second batching is never enabled. This is the exact opposite of what we want to happen since batching speeds the operations up. Here are the results for libyang2 code without and with batching. | action | 1K rts | 2K rts | 1K rts | 2K rts | 20k rts | | | nobatch | nobatch | batch | batch | batch | | Add IPv4 | .881 | 1.28 | .703 | 1.04 | 8.16 | | Add Same IPv4 | 28.7 | 113 | .590 | .860 | 6.09 | | Rem 1/2 IPv4 | .376 | .442 | .379 | .435 | 1.44 | | Add Same IPv4 | 28.7 | 113 | .576 | .841 | 6.02 | | Rem All IPv4 | 17.4 | 71.8 | .559 | .813 | 5.57 | (IPv6 numbers are basically the same as iPv4, a couple percent slower) Clearly we need this. Please note the growth (1K to 2K) w/o batching is non-linear and 100 times slower than batched. Notes on code: The use of the new `nb_cli_apply_changes_clear_pending` is to commit any pending changes (including the current one). This is done when the code would not correctly handle a single diff that included the current changes with possible following changes. For example, a "no" command followed by a new value to replace it would be merged into a change, and the code would not deal well with that. A good example of this is BGP neighbor peer-group changing. The other use is after entering a router level (e.g., "router bgp") where the follow-on command handlers expect that router object to now exists. The code eventually needs to be cleaned up to not fail in these cases, but that is for future NB cleanup. Signed-off-by: Christian Hopps <chopps@labn.net>