summaryrefslogtreecommitdiffstats
path: root/isisd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #6711 from GalaxyGorilla/bfd_isis_profilesQuentin Young2020-07-217-47/+153
|\ | | | | Add BFD profiles for IS-IS
| * isisd: lib: refactor ISIS BFD APIGalaxyGorilla2020-07-101-23/+48
| | | | | | | | | | | | Use `zclient_bfd_command` instead of `bfd_peer_sendmsg`. Signed-off-by: GalaxyGorilla <sascha@netdef.org>
| * *: add BFD profile support for IS-ISGalaxyGorilla2020-07-107-24/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | isisd: fix OpenBSD pedantic format warningsDavid Lamparter2020-07-142-4/+4
| | | | | | | | | | | | | | | | constants are int-typed, so adding something to an uint8_t yields an int. Nevermind the fact that varargs calling conventions require upcasting everything smaller than an int to an int anyways... Signed-off-by: David Lamparter <equinox@diac24.net>
* | *: remove PRI[udx](8|16|32)David Lamparter2020-07-149-163/+106
| | | | | | | | | | | | | | | | | | | | | | These are completely pointless and break coccinelle string replacements. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --pri8-16-32 `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
* | *: un-split strings across linesDavid Lamparter2020-07-1412-112/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | isisd: fix Coverity warningEmanuele Di Pascale2020-07-101-1/+1
|/ | | | | | | | no need to check cicuit->area, as all code paths leading there had already dereferenced it. Fixes CID 1496314 Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* Merge pull request #6385 from GalaxyGorilla/bfd_igp_topotestRenato Westphal2020-07-086-18/+53
|\ | | | | isis: tests: Fast RIB recovery from BFD recognized link failures
| * isisd: Fast RIB recovery from BFD recognized link failuresGalaxyGorilla2020-07-036-18/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately as the topotests show a fast recovery after failure detection due to BFD is currently not possible because of the following issue: There are multiple scheduling mechanisms within isisd to prevent overload situations. Regarding our problem these two are important: * scheduler for regenerating ISIS Link State PDUs scheduler for managing * consecutive SPF calculations In fact both schedulers are coupled, the first one triggers the second one, which again is triggered by isis_adj_state_change (which again is triggered by a BFD 'down' message). The re-calculation of SPF paths finally triggers updates in zebra for the RIB. Both schedulers work as a throttle, e.g. they allow the regeneration of Link State PDUs or a re-calculation for SPF paths only once within a certain time interval which is configurable (and by default different!). This means that a request can go through the first scheduler but might still be 'stuck' at the second one for a while. Or a request can be 'stuck' at the first scheduler even though the second one is ready. This also explains the 'random' behaviour one can observe testing since a 'fast' recovery is only possible if both schedulers are ready to process this request. Note that the solution in this commit is 'thread safe' in the sense that both schedulers use the same thread master such that the introduced flags are only used exactly one time (and one after another) for a 'fast' execution. Further there are some irritating comments and logs which I partially removed. They seems to be not valid anymore due to changes in thread management (or they were never valid in the first place). Signed-off-by: GalaxyGorilla <sascha@netdef.org>
* | isisd: gracefully handle spf errorEmanuele Di Pascale2020-07-061-4/+17
|/ | | | | | | | | | | the code in isis_spf_add2tent was asserting in case the vertex we were trying to add was already present in the path or tent trees. This however CAN happen if the user accidentally configures the system Id of the area to the same value of an estabished neighbor. Handle this more gracefully by logging and returning, to prevent crashes. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* Merge pull request #6437 from opensourcerouting/bfd-profiles-bgpDonald Sharp2020-07-021-4/+7
|\ | | | | bfdd,bgpd: profiles integration support
| * isisd: check interface pointer before accessingRafael Zalamena2020-05-311-4/+7
| | | | | | | | | | | | | | | | On some cases (protocol convergence down or daemon exit) we'll have the interface pointer in the circuit as `NULL`, so don't attempt to access it. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | isisd: log adj change when circuit goes downEmanuele Di Pascale2020-07-013-17/+76
| | | | | | | | | | | | | | | | | | if we shutdown an interface isisd will delete the adjacencies on the corresponding circuit, but it will not log the change. Fix it to make sure that each change is logged. Also specify the level of the adjacency in the log message, while we are at it. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* | Merge pull request #6635 from Niral-Networks/niral_dev_vrf_isisRenato Westphal2020-06-272-2/+13
|\ \ | | | | | | ISIS VRF: Added vrf_socket and new param in isisd privileges.
| * | ISIS VRF: Added vrf_socket and new param in isisd privileges.Kaushik2020-06-242-2/+13
| | | | | | | | | | | | | | | | | | | | | 1. The socket() call replaced with vrf_socket() in open_packet_socket(). 2. One new isisd privileges is added in zebra_capabilities_t []. Signed-off-by: Kaushik <kaushik@niralnetworks.com>
* | | Merge pull request #6619 from Niral-Networks/niral_isis_debug_p2Donald Sharp2020-06-2516-135/+194
|\ \ \ | |/ / |/| | ISIS VRF: ISIS Debug structure modifications Type 2
| * | ISIS VRF: ISIS Debug structure modificationsharios2020-06-2416-135/+194
| | | | | | | | | | | | | | | | | | 1. The "isis->debug" variable dependency on debug logs print is removed. Signed-off-by: harios <hari@niralnetworks.com>
* | | Merge pull request #6451 from Orange-OpenSource/dev_isis_srRenato Westphal2020-06-2411-274/+806
|\ \ \ | | | | | | | | ISISd: Add Segment Routing local block (SRLB)
| * | | isisd: Segment Routing improve subTLVs parserOlivier Dugeon2020-06-232-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Segment Routing, isis_tlvs.c may failed if incorrect or maformed TLVs are sent to the FRR router. This patch improve detection of such subTLVs error and skip them, in particular for SRGB, SRLB and MSD subTLVs. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
| * | | isisd: Start Label Manager saferOlivier Dugeon2020-06-235-75/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial attempt to connect to the Label Manager used an infinite loop with a sleep statement which block isisd until Label Manager connection fire up. This commit changes the way Label Manager connection is established and uses a `thread_add_timer()` call to re-attempt to establish the connection in case of failure (zebra or label manager not ready). New variables are added to the SRDB in order to control the request of SRGB and SRLB to the Label Manager to start Segment Routing in a safe way. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
| * | | isisd: Add Segment Routing Local Block supportOlivier Dugeon2020-06-2311-227/+627
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* / / ISIS VRF: Route info with vrf_id from ISIS to ZebraKaushik2020-06-193-9/+15
|/ / | | | | | | | | | | | | 1. The "VRF_DEFAULT" param is changed to "isis->vrf_id" before sending the routes to zebra. Signed-off-by: Kaushik <kaushik@niralnetworks.com>
* | Merge pull request #6543 from volta-networks/fix_isis_afset_noareaDonald Sharp2020-06-102-24/+19
|\ \ | | | | | | isisd: fix segfault in isis_circuit_af_set
| * | isisd: prevent segfault in isis_circuit_af_setEmanuele Di Pascale2020-06-101-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | before the last commit, it was possible under some circumstances to call isis_circuit_af_set on a circuit with a NULL area, e.g. if the circuit was deconfigured due to a validation error. While this should not happen now, let's add an explicit check to avoid crashing if a regression is introduced. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
| * | isisd: keep circuit config on conf->up failureEmanuele Di Pascale2020-06-101-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if we are not able to bring a circuit up due to some config issue, e.g. a low MTU compared to the area lsp-mtu, we should not remove the configuration, as this will push out of sync with the YANG state and create more issues down the line. Instead, keeping the circuit state at C_STATE_CONF should be sufficient. For the specific case of the MTU mismatch above, this also means that when we receive a new IF_UP_FROM_Z when the MTU is changed we will be able to bring the circuit up as we should. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* | | Merge pull request #6414 from opensourcerouting/nb-error-handlingSantosh P K2020-06-101-42/+63
|\ \ \ | |/ / |/| | NB context + enhanced error handling
| * | *: convert northbound callbacks to new error handling modelRenato Westphal2020-05-291-42/+63
| |/ | | | | | | | | | | | | | | | | | | | | | | The northbound configuration callbacks should now print error messages to the provided buffer (args->errmsg) instead of logging them directly. This will allow the northbound layer to forward the error messages to the northbound clients in addition to logging them. NOTE: many callbacks are returning errors without providing any error message. This needs to be fixed long term. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | Merge pull request #6537 from volta-networks/fix_isis_adj_up_initDonald Sharp2020-06-101-7/+10
|\ \ | | | | | | isisd: fix adj up->init transition
| * | isisd: fix adj up->init transitionEmanuele Di Pascale2020-06-091-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there are some paths, e.g. when an established neighbor sends us hellos with a different IS level, where we go from adj_state UP to INIT. In such cases we might not update our SPFs or the circuit state, as the state change function was only testing for the UP and DOWN cases. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* | | *: add filter northbound supportRafael Zalamena2020-06-051-0/+1
|/ / | | | | | | | | | | Allow all daemons to work with filter northbound. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* / isisd: fix local address TE TLVEmanuele Di Pascale2020-05-291-1/+2
|/ | | | | | | | we were not correctly checking the MPLS-TE status of the area when adding an IP address to a circuit, and this was preventing the local address TLV to be populated after an interfaced flap. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* Merge pull request #6425 from opensourcerouting/nb-state-cbs-fixesDonald Sharp2020-05-213-86/+129
|\ | | | | northbound state callbacks fixes
| * isisd, yang: move IS-IS interface state data to the appropriate placeRenato Westphal2020-05-163-80/+120
| | | | | | | | | | | | | | | | | | | | | | Now that the "frr-interface" list has a "state" container, move the IS-IS interface state nodes underneath it using a new augmentation. Also, update the IS-IS SR topotest to account for this change. Make use of symlinks where possible to avoid having multiple files with the same content. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * isisd: fix crash in the adjacency get_next() NB callbackRenato Westphal2020-05-161-6/+9
| | | | | | | | | | | | | | Add a null check to solve the problem (circuit->u.bc.adjdb[level - 1] is guaranteed to be non-null only on L1/L2 areas). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | isisd: set TE link params on circuit creationEmanuele Di Pascale2020-05-191-0/+2
|/ | | | | | | | | if mpls-te is enabled in the area, on creating a circuit we must refresh the link params - else interfaces that are enabled for IS-IS after configuring 'mpls-te on' will not correctly advertise link parameters. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: Update Segment Routing Show CommandsOlivier Dugeon2020-05-141-30/+136
| | | | | | | * Improve `show isis segment-routing prefix-sids` output * Add new `show isis segment-routing node' command Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* isisd: IS-IS-SR preparation for master 5/5Olivier Dugeon2020-05-145-113/+517
| | | | | | Update comments (doxygen style) for all functions. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* isisd: IS-IS-SR preparation for master 4/5Olivier Dugeon2020-05-145-55/+83
| | | | | | | | | | * Regroup fonctions to install label for Prefix and Adjacency SID * Change 'replace_semantics' variable name by 'make_before_break' in sr_prefix_reinstall() function and adjust comments * Call directly lsp_regenerate_schedule() from isis_nb_config.c when MSD is updated Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* isisd: IS-IS-SR preparation for master 3/5Olivier Dugeon2020-05-143-94/+109
| | | | | | Add debug macro and debug messages Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* isisd: IS-IS-SR preparation for master 2/5Olivier Dugeon2020-05-143-183/+168
| | | | | | | | | * Rename functions following rules: isis_sr_XXX is kept for external functions and isis_sr prefix remove for static ones * Rename local_label & remote_label variables by input_label & output_label * Change parameter order (to follow other functions) in sr_node_srgb_update() Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* isisd: IS-IS-SR preparation for master 1/5Olivier Dugeon2020-05-142-80/+85
| | | | | | | | | * Rename RB-TREE variable from tree_sr_XXX to srdb_XXX * Replace parse_flags by an enum and rename it srdb_state which reflects more the role of this flag: determined the state of SR-Node and SR-Prefix stored in the SRDB: VALIDATED, NEW, MODIFIED, UNCHANGED Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* isisd: Update IS-IS SR Label ManagerOlivier Dugeon2020-04-301-5/+70
| | | | | | | | | | This change modify the way IS-IS is connected to the Label Manager: - Add emission of Hello Message prior to the connection as per modification introduced by PR #5925 - Add 'session_id' as per modification introduced by PR #6224 - Add Doxygen documentation to Label Manager functions Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* isisd: Update ISIS-SR with new ZAPI messageOlivier Dugeon2020-04-302-9/+10
| | | | | | | Update label enforcement due to modification in zapi message: zapi_nexthop_label becomes zapi_nexthop as per PR #5813 Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* isisd: add support for segment routingRenato Westphal2020-04-3022-110/+2522
| | | | | | | | | | | | | | | | | | | | | | 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>
* isisd: add segment-routing CLI commandsRenato Westphal2020-04-303-0/+235
| | | | | | | In the name of consistency, these commands are very similar to the ospfd SR configuration commands. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* isisd: add segment-routing YANG nodes and skeleton callbacksRenato Westphal2020-04-303-0/+257
| | | | | | | | | | Most definitions were borrowed from the IETF IS-IS SR YANG module, with a few adaptations. Of particular notice are the following: * No support for the configuration of multiple SRGBs. * No distinction between local and connected Prefix-SIDs, both are configured the same way. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* isisd: remove refcount from the isis_nexthop structureRenato Westphal2020-04-304-18/+1
| | | | | | | | | | | | | | | | | isisd implements an optimization that allows multiple routes to share the same nexthop (using a refcount) in order to save memory. Now that SR support is coming, however, it will be necessary to embed additional SR-related information inside the isis_nexthop structure. But this can only be done if the nexthops aren't shared among routes anymore. Removing this memory optimization should have minimal impact since the isis_nexthop structure is really small. On large networks with thousands of routes, the memory saving would be in the order of a few kilobytes. Not something we should be concerned about nowadays. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* isisd: split vty_out_timestr() into two helper functionsRenato Westphal2020-04-302-0/+21
| | | | | | | | | The new log_uptime() function logs an UNIX timestamp to a buffer provided by the user. It's very flexibile and can be used in a variety of contexts, different from vty_out_timestr() which is too tied to the VTY code. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* isisd: introduce new adjacency hooksRenato Westphal2020-04-302-0/+29
| | | | | | | | | | | | | | The 'isis_adj_ip_enabled_hook' hook will be called whenever an adjacency goes from zero to one or more IPv4 or IPv6 addresses. Conversely, the 'isis_adj_ip_disabled_hook' hook will be called whenever an adjacency goes from one or more IPv4/IPv6 addresses to no addresses at all. These hooks will be used by the upcoming SR code to add/delete Adj-SIDs depending on the IP addresses present in the remote adjacencies. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* build: make clippy Makefile rules nicerDavid Lamparter2020-04-271-2/+3
| | | | | | | These are easy to get subtly wrong, and doing so can cause nondeterministic failures when racing in parallel builds. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>