Commit Graph

97 Commits

Author SHA1 Message Date
Igor Ryzhov
a80618f27d isisd: fix using vrf interface as a loopback
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-28 18:45:40 +03:00
Christian Hopps
3bb513c399 lib: adapt to version 2 of libyang
Compile with v2.0.0 tag of `libyang2` branch of:
https://github.com/CESNET/libyang

staticd init load time of 10k routes now 6s vs ly1 time of 150s

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-05-13 16:24:48 -04:00
Igor Ryzhov
081f9b29df isisd: fix bfd config output
Don't show default BFD config ("no isis bfd") if show_enabled flag is not set.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-07 12:03:57 +03:00
Igor Ryzhov
c022a581ec isisd: enable autocompletion for bfd profiles
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-07 12:03:57 +03:00
Igor Ryzhov
bb28b985fd isisd: fix "no bfd profile" command
Instead of setting the profile to an empty string we should destroy the
NB node.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-07 12:03:57 +03:00
Fredi Raspall
ce4eccfa80 isisd: link protection optional fallback in ti-lfa
The current implementation of TI-LFA computes link-protecting
repair paths (even when node protection is enabled) to have repair
paths to all destinations when no node-protecting repair has been
found. This may be desired or not. E.g. the link-protecting paths
may use the protected node and be, therefore, useless if the node
fails. Also, computing link-protecting repairs incurs extra
calculations.

With this patch, when node protection is enabled, link protecting
repair paths are only computed if "link-fallback" is specified in
the configuration, on a per interface and IS-IS level.

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
2021-05-03 17:27:37 +02:00
Igor Ryzhov
f07572c3c7 isisd: move ldp-sync checks from cli to nb callbacks
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-29 17:05:21 +03:00
Igor Ryzhov
b5c0a71b56 isisd: don't use operational data in "no isis circuit-type"
Use the config data instead.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-29 17:05:21 +03:00
Igor Ryzhov
1457b1d5df isisd, yang: remove vrf leaf from isis interface node
This is very confusing and incorrect. We can and should use vrf leaf of
the interface itself instead.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-29 17:05:21 +03:00
Igor Ryzhov
aaf8e80994 isisd: don't use operational data in "ip/ipv6 router isis"
Currently the operational data is used for two things:
- to inherit the is-type from the isis instance
- to set passive flag for loopback interfaces

This commit implements the first one using only the config data.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-29 17:05:21 +03:00
Igor Ryzhov
95018cdaa5 isisd: don't create instances directly from cli
This must be done only through NB code. The necessary change is enqueued
right on the next two lines.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-29 17:05:21 +03:00
Igor Ryzhov
f2c170ce95 isisd: don't use operational data in "no router isis"
We need to delete isis config from interfaces when we delete the isis
router instance. This should be done using only config data.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-29 17:05:21 +03:00
Igor Ryzhov
25fe5b0fe8 isisd: remove useless checks from cli
is-type defaults to level-1-2 for more than a year already.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-29 17:05:21 +03:00
Igor Ryzhov
2ba0884a65 isisd: fix extra space after "ip router isis"
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-24 10:30:36 +03:00
Donald Sharp
31200a2963 isisd: Fix extra space after router isis FOO
Fix places where we are outputing an extra space.  This was
because it was prepping for vrf but we may not have a vrf.

Fixes: #8300
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-21 13:12:41 -04:00
Emanuele Di Pascale
01d431418b isisd, yang, doc: combine config cmd for SRGB+SRLB
when changing both ranges at the same time the order of the commands
matters, as we need to make sure that the intermediate state is valid.
This represents a problem when pushing configuration via frr-reload.
To fix this, the global-block command was extended to optionally
allow setting the local-block range as well. The local-block command
is deprecated with a 1-year notice.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2021-03-10 11:02:30 +01:00
lynne
f3abc412a5 isisd: Fix Attach-bit processing
The purpose of the Attach-bit is to accomplish inter-area routing.  In other
venders, the Attached-bit is automatically set when a router is configured
as a L1|L2 router and has two adjacencies.  When a L1 router receives a LSP
with the Attached-bit set it is supposed to create a default route pointing
toward the neighbor to provide a default path out of the L1 area.

ISIS implementation has been fixed to support the above definition:
Setting the Attach-bit is now the default behavior and we allow the user to
turn it off.

We will only set the Default Attach-bit when creating a L1 LSP, if we are
a L1|L2 router and have a L2 adjacency up.

When a L1 router receives a LSP with the Attach-bit set, we will create a
default route pointing to the L1|L2 router as the nexthop.

The default route will be removed if the LSP is received with the Attach-bit
cleared.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-01-20 09:24:35 -05:00
Renato Westphal
381200be9d yang, isisd: add RLFA nodes, skeleton callbacks and CLI commands
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-01-08 22:22:11 -03:00
Renato Westphal
7ab5ca1047 isisd: fix LFA command to use correct operations
The "load-sharing" node is a boolean leaf that has a default
value. As such, it doesn't make sense to either create or delete
it. That node always exists in the configuration tree. Its value
should only be modified. Change the corresponding CLI wrapper
command to reflect that fact.

This commit doesn't introduce any change of behavior as the NB API
maps create/destroy edit operations to modify operations whenever
that makes sense. However it's better to not rely on that behavior
and always use the correct operations in the CLI commands.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-01-08 22:22:11 -03:00
Donald Sharp
cb5a294642
Merge pull request #7590 from opensourcerouting/isisd-lfa
isisd: add support for classic LFA
2020-12-02 20:43:51 -05:00
Renato Westphal
d20b14bcd7 yang, isisd: add LFA nodes, NB skeleton callbacks and CLI commands
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-11-24 20:15:52 -03:00
Renato Westphal
db0a0f2e7b isisd: fix some crashes with --tcli
The "ifp" variable returned by nb_running_get_entry() might be
NULL when using the transactional CLI mode. Make the required
modifications to avoid null pointer dereferences.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-11-23 15:22:36 -03:00
Donald Sharp
02c671af40 *: Correct spelling stuff
Pretty obvious.  WE R SPELL GOOD

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-29 16:16:00 -04:00
Renato Westphal
01983712cc isisd: add support for Anycast-SIDs
Add the "n-flag-clear" option to the "segment-routing prefix"
command. The only thing that option does is to clear the node
flag of the Prefix-SID, even if it corresponds to a local loopback
address. No changes are necessary other than that in order to fully
support Anycast-SIDs.  isisd already supports multiple routers
advertising the same route with the same Prefix-SID after the recent
refactoring. Clearing the node flag for such anycast routes isn't
strictly required, but failure to do so can lead to problems like
TI-LFA picking the wrong Prefix-SID when calculating repair paths.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-23 10:31:39 -03:00
Renato Westphal
ed5d703279 yang, isisd: add TI-LFA YANG nodes and corresponding skeleton callbacks
Add CLI wrapper commands as well...

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-14 16:27:37 -03:00
Igor Ryzhov
31011d9cbe isisd, ospfd: fix missing/excessive docstrings
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-10-02 18:51:12 +03:00
Jafar Al-Gharaibeh
58e6747297
Merge pull request #7095 from donaldsharp/coverity_5
isisd: ifp cannot be NULL
2020-09-11 22:07:56 -05:00
Renato Westphal
beb91114ec
Merge pull request #6789 from volta-networks/feat_ldp_igp_sync
ldpd: Add support for LDP-IGP Synchronization
2020-09-11 15:55:04 -03:00
Donald Sharp
491d1cc12b isisd: ifp cannot be NULL
the ifp pointer cannot be NULL when we get to this point
in the code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-11 14:30:24 -04:00
lynne
1cbf96a8ad isisd: ldp-igp-sync feature: adding isis support
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
2020-09-09 14:38:44 -04:00
harios_niral
65251ce80f doc, yang, isisd : Support for different VRF in isisd
1. Added isis with different vrf and it's dependecies.
2. Added new vrf leaf in yang.
3. A minor change for IF_DOWN_FROM_Z passing argrument is
   replaced with ifp pointer in api "isis_if_delete_hook()".
4. Minor fix in the isisd spf unit test.

Co-authored-by: Kaushik <kaushik@niralnetworks.com>"
Signed-off-by: harios_niral <hari@niralnetworks.com>
2020-09-01 00:48:05 -07:00
Kaushik
eab88f3655 isisd : Transformational changes to support different VRFs.
1. Created a structure "isis master".
2. All the changes are related to handle ISIS with different vrf.
3. A new variable added in structure "isis" to store the vrf name.
4. The display commands for isis is changed to support different VRFs.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-08-14 13:46:22 -07:00
Renato Westphal
6aa15aebc3 isisd: normalize CLI help strings to always use IS-IS
Some commands were using IS-IS while others were using ISIS. Fix
this inconsistency (prefer the former option for obvious reasons).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-08-11 01:03:44 -03:00
Renato Westphal
ca77b518bd *: introduce DEFPY_YANG & friends
DEFPY_YANG will allow the CLI to identify which commands are
YANG-modeled or not before executing them. This is going to be
useful for the upcoming configuration back-off timer work that
needs to commit pending configuration changes before executing a
command that isn't YANG-modeled.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-08-03 15:17:03 -03:00
Quentin Young
65b86778c1
Merge pull request #6711 from GalaxyGorilla/bfd_isis_profiles
Add BFD profiles for IS-IS
2020-07-21 14:45:31 -04:00
David Lamparter
3efd0893d0 *: un-split strings across lines
Remove mid-string line breaks, cf. workflow doc:

  .. [#tool_style_conflicts] For example, lines over 80 characters are allowed
     for text strings to make it possible to search the code for them: please
     see `Linux kernel style (breaking long lines and strings)
     <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_
     and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_.

Scripted commit, idempotent to running:
```
python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'`
```

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-07-14 10:37:25 +02:00
GalaxyGorilla
4affdba79e *: add BFD profile support for IS-IS
BFD profiles can now be used on the interface level like this:

	interface eth1
	  ip router isis 1
          isis bfd
          isis bfd profile default

Here the 'default' profile needs to be specified as usual in the
bfdd configuration.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-07-10 11:28:43 +00:00
Olivier Dugeon
d839131273 isisd: Add Segment Routing Local Block support
Segment Routing Local Block (SRLB) is part of RFC8667. This change introduces
the possibility for isisd to advertize SRLB in LSP. Base and Range of SRLB
could be configured through CLI or Yang.

Adjacency-SID are now using this SRLB for label allocation. SRLB could also
be used for SID-Binding (e.g. LDP to SR).

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-06-23 16:36:56 +02:00
Renato Westphal
26f6acafc3 isisd: add support for segment routing
This is an implementation of the IS-IS SR draft [1] for FRR.

The following features are supported:
* IPv4 and IPv6 Prefix-SIDs;
* IPv4 and IPv6 Adj-SIDs and LAN-Adj-SIDs;
* Index and absolute labels;
* The no-php and explicit-null Prefix-SID flags;
* Full integration with the Label Manager.

Known limitations:
* No support for Anycast-SIDs;
* No support for the SID/Label Binding TLV (required for LDP interop).
* No support for persistent Adj-SIDs;
* No support for multiple SRGBs.

[1] draft-ietf-isis-segment-routing-extensions-25

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-04-30 12:15:47 +02:00
Renato Westphal
8f6c893629 isisd: add segment-routing CLI commands
In the name of consistency, these commands are very similar to the
ospfd SR configuration commands.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-04-30 11:37:38 +02:00
Renato Westphal
66c79a36ea
Merge pull request #6181 from volta-networks/fix_isisd_no_metric_style
isisd: fix two 'no X' commands
2020-04-11 23:29:28 -03:00
Emanuele Di Pascale
fd506bbb4d isisd: fix two 'no X' commands
for some reason, when issuing a 'no metric-style' command we were
setting the metric-style to narrow, even though the default is
actually wide. Use NULL to avoid similar problems in the future.

Likewise, the 'no is-type' command was still trying to implement
the old logic of applying a different default for the first area.
In practice this had no effect because the value would now be the
same in both cases, but it's better to remove useless code anyway.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2020-04-07 21:57:08 +02:00
Emanuele Di Pascale
d2c970ffb2 isisd, yang: unified lsp-timers command
Yang constraints enforced by the northbound callbacks require that
the maximum lifetime be >= than (refresh interval + 300). When we are
moving from one config to another through frr-reload.py, we issue
a number of vtysh -c commands ('no lsp-refresh-interval level-1 500',
'no max-lsp-lifetime level-1 1000'), which reset these parameters to their
default values, respectively 900 and 1200. Depending on the actual
values in the current config, the order in which these commands are sent
might be the wrong one, in that we hit an invalid intermediate state and
make vtysh (and by extension frr-reload.py) return an error.

As a workaround, let's add a one-liner command that sets all these
inter-related parameters in one go, and make isisd display them as a
single line too, so that the diff will be computed as a single command.
The old individual commands are kept to ensure backwards compatibility.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2020-04-06 17:38:27 +02:00
Emanuele Di Pascale
249312abb9 isisd: fix hello cmds vtysh output
once again, for both hello-multiplier and hello-interval
the order in which the number and level were shown in the
cli_show methods was inverted compared to the vtysh command,
which created issues with frr-reload.py.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2020-03-25 16:35:29 +01:00
Emanuele Di Pascale
d32a4cac6f isisd: fix vty show isis metric
the vtysh command to set the isis metric on an interface
is 'isis metric level-1 X', but when showing the running
config we were displaying it as 'isis metric X level-1'.
This would confuse frr-reload.py when attempting to apply
a config file populated with the correct command; on the
other hand, using the show command format would return an
error when running vtysh -C on the file.

Fix this by making the show command return the same format
as the vtysh setting command.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2020-03-20 16:43:53 +01:00
Renato Westphal
2a1c520e9f isisd: split northbound callbacks into multiple files
Rearrange the isisd northbound callbacks as following:
* isis_nb.h: prototypes of all northbound callbacks.
* isis_nb.c: definition of all northbound callbacks and their
  associated YANG data paths.
* isis_nb_config.c: implementation of YANG configuration nodes.
* isis_nb_state.c: implementation of YANG state nodes.
* isis_nb_notifications.c: implementation of YANG notifications.

This should help to keep to code more organized and easier to
maintain.

No behavior changes intended.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-10-29 21:49:14 -03:00
Renato Westphal
8685be73e0 Revert "lib: introduce a read-write lock for northbound configurations"
Adding a lock to protect the global running configuration doesn't
help much since the FRR daemons are not prepared to process
configuration changes in a pthread that is not the main one (a
whole lot of new protections would be necessary to prevent race
conditions).

This means the lock added by commit 83981138 only adds more
complexity for no benefit. Remove it now to simplify the code.

All northbound clients, including the gRPC one, should either run
in the main pthread or use synchronization primitives to process
configuration transactions in the main pthread.

This reverts commit 83981138fe.
2019-09-18 14:35:10 -03:00
Renato Westphal
def117f732 isisd: fix display of the "isis bfd" command
We need to indent this command using one leading whitespace otherwise
vtysh will have problems to display it appropriately.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-08-16 18:00:58 -03:00
Rafael Zalamena
8222b997c7 isisd: improvements based on feedback
* Remove sanity checks that are already done by northbound;
  * Show error message on circuit absence;
  * Use a better idiom for the configuration display code;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-07-12 17:24:17 -03:00
Rafael Zalamena
c3e6ac0bba isisd: migrate BFD command to northbound
Specify the ISIS BFD command in the YANG model and implement the
northbound callbacks.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-07-09 13:22:46 -03:00