summaryrefslogtreecommitdiffstats
path: root/isisd/isis_lsp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* isisd: Add Node MSD Sub-TLV (SRv6) to the LSPsCarmine Scarpitta2023-09-111-0/+12
| | | | | | | Add Node MSD Sub-TLV containing the SRv6 MSDs to the Router Capabilities TLV in the LSPs generated with the `lsp_build()` function. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add SRv6 Capabilities Sub-TLV to the LSPsCarmine Scarpitta2023-08-041-0/+8
| | | | | | | Add SRv6 Capabilities Sub-TLV to the Router Capabilities TLV in the LSPs generated with the `lsp_build()` function. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: fix disabled flex-algo on race conditionLouis Scalbert2023-04-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | A particular flex-algo algorithm may remain in disabled state after configuring it if its flex-algo definition is being spread in the area. It happens sometimes that, in isis_sr_flex_algo_topo1 topotest, r3 flex-algo 203 is disabled on test8. It depends on the following sequence on r3: 1. a LSP containing the flex-algo 203 definition is received from either r1 or r2 (or both). 2. the local LSP is rebuilt by lsp_build() because of the flex-algo 203 configuration 3. isis_run_spf() recomputes the algo 203 SPF tree A 1. 2. 3. sequence results in a working test whereas 2. 1. 3. is not working. The second case issue is because of an inconsistent flex-algo definition state between the following: - in lsp_build(), isis_flex_algo_elected_supported_local_fad() returns false because no flex-algo definition is known. - in isis_run_spf(), isis_flex_algo_elected_supported() returns true because a flex-algo definition is found. Set a flex-algo state lsp_build() depending on flex-algo definition existence that is used later in isis_run_spf(). Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: add isis flex-algo lsp advertisementHiroki Shirokura2023-04-181-23/+79
| | | | | | | | | | | | | | | | | | | | | | Deal with the packing and unpacking of following Flex-Algo Sub-Sub-TLVs: - Router Capability (already defined TLV 242) - List of the Flex-Algo Definitions (Sub-TLV 26) - Exclude admin group (Sub-Sub-TLV 1) - Include-any admin group (Sub-Sub-TLV 2) - Include-all admin group (Sub-Sub-TLV 3) - Flags (for prefix-metric) (Sub-Sub-TLV 4) This commit splits data into multiple router capability TLVs if needed because a TLV cannot contains more than 255 bytes. Note that the list of SR Algorithm (Sub-TLV 19) within Router Capability (TLV 242) is already set in a previous commit. 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>
* isisd: refactor IP reachability lsp buildLouis Scalbert2023-04-181-53/+53
| | | | | | | | | | Refactor IP reachability lsp build to comply with checkpatch: > WARNING: Too many leading tabs - consider code refactoring No code logic change. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: update isis_tlvs_add_*_reach() with multi algorithmHiroki Shirokura2023-04-181-17/+32
| | | | | | | | | | | | | | | | | | isis_tlvs_add_extended_ip_reach adds IS-IS Extended IP reachability to the LSP. In this case, if the pcfg argument is not NULL, you can add IGP Prefix-SID as its sub tlv. Before this commit, only one Prefix-SID can be added. After this commit, the argument is not a single pointer but an array of pointers, and multiple Prefix-SIDs can be added. This feature is necessary because Flex-Algo requires multiple Prefix-SIDs for each Algorithm. Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: update SR_ALGORITHM_COUNT to 256Hiroki Shirokura2023-04-181-4/+4
| | | | | | | | | | Before this commit, SR_ALGORITHM_COUNT was set to 2, and each was hardcoded with router capability tlv. When Flex-Algo is supported, SR-Algorithm may be variably supported up to 256. Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: update struct sr_prefix_cfg with algorithm idHiroki Shirokura2023-04-171-4/+7
| | | | | | | | | | | The information in prefix-sid has a new property called algorithm id. This is used to identify the algorithm that separates it in the same IGP network. This is used in Flex-Algo.In all other cases, the algorithm id is basically 0. Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* Merge pull request #12698 from Orange-OpenSource/isisdRuss White2023-04-111-71/+56
|\ | | | | Isisd/Lib: Add new printfrr format facility for Intermediate System ID
| * isisd: Update to the new printfrr ISO formatOlivier Dugeon2023-03-211-71/+56
| | | | | | | | | | | | | | | | | | This path replaces isisd_format_id, sysid_print, snpa_print, rawlspid_print and isonet_print functions by the new printfrr ISO System ID & Network Address format facilities. It also updates the isisd code to the new iso_address structure defined in lib/iso.h Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* | *: Convert event.h to frrevent.hDonald Sharp2023-03-241-1/+1
| | | | | | | | | | | | | | We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp2023-03-241-9/+9
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Convert a bunch of thread_XX to event_XXDonald Sharp2023-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert these functions: thread_getrusage thread_cmd_init thread_consumed_time thread_timer_to_hhmmss thread_is_scheduled thread_ignore_late_timer Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Convert thread_timer_remain_XXX to event_timer_remain_XXXDonald Sharp2023-03-241-2/+2
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Convert thread_add_XXX functions to event_add_XXXDonald Sharp2023-03-241-28/+25
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Rename `struct thread` to `struct event`Donald Sharp2023-03-241-8/+8
| | | | | | | | | | | | | | | | | | Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Rename thread.[ch] to event.[ch]Donald Sharp2023-03-241-1/+1
|/ | | | | | | | | | | This is a first in a series of commits, whose goal is to rename the thread system in FRR to an event system. There is a continual problem where people are confusing `struct thread` with a true pthread. In reality, our entire thread.c is an event system. In this commit rename the thread.[ch] files to event.[ch]. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* Merge pull request #12840 from dorDiogo/isis_advertise_passive_onlyRuss White2023-02-281-0/+7
|\ | | | | isisd: Add support for IS-IS advertise-passive-only
| * isisd,doc: Add support for isis advertise-passive-onlyDiogo Oliveira2023-02-221-0/+7
| | | | | | | | Signed-off-by: Diogo Oliveira <14191454+dorDiogo@users.noreply.github.com>
* | Merge pull request #12819 from isabelladeleon12/isis_load_config_before_lsp_genRuss White2023-02-281-0/+4
|\ \ | |/ |/| isisd: Delay lsp generation to after config processing is complete
| * isisd: Fix isisd to generate lsps after config processing is completeIsabella de Leon2023-02-211-0/+4
| | | | | | | | | | | | | | | | | | | | Before: isisd generates its initial lsp before fully processing the written config. Ex: lsp_generate() is called in isis_instance_area_address_create(), before other configs that may affect the lsp are loaded in, like set-overload-bit. After: isisd generates its initial lsp as soon as the config is fully processed. This was done by utilizing the initialization config callbacks, similar to bgp's implementation. Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
* | *: auto-convert to SPDX License IDsDavid Lamparter2023-02-091-14/+1
|/ | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* isisd: Add JSON object functions to save overload status between restarts.Isabella de Leon2022-10-131-14/+13
| | | | Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
* isisd: Add expected behavior with set-overload-bitIsabella de Leon2022-10-121-1/+4
| | | | Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
* isisd: Add overload timer and overload on startup functionalityIsabella de Leon2022-09-301-0/+29
| | | | Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
* isisd: Convert thread_cancel to THREAD_OFFDonald Sharp2022-07-211-4/+4
| | | | | | Just convert all uses of thread_cancel to THREAD_OFF Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* isisd: Fix crash with xfrm interface typeDonald Sharp2022-06-231-4/+2
| | | | | | | | | | | | | | When creating a xfrm interface FRR is crashing when configured with isis. This is because the weird pattern of not allocating list's until needed and then allowing the crash when we have a usage pattern that was not expected. Just always allocate the different lists that a circuit needs. (gdb) bt (gdb) Fixes #11432 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* Merge pull request #10701 from rampxxxx/feat_isis_json_show_cmdsRuss White2022-03-081-13/+63
|\ | | | | Feat isis json show cmds
| * isisd: Add json to show isis database command.Javier Garcia2022-03-021-13/+63
| | | | | | | | Signed-off-by: Javier Garcia <javier.martin.garcia@ibm.com>
* | *: Change thread->func to return void instead of intDonald Sharp2022-02-241-16/+14
|/ | | | | | | The int return value is never used. Modify the code base to just return a void instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* isisd: Prepare IS-IS for Link State supportOlivier Dugeon2021-11-301-16/+35
| | | | | | | | | | | | | | | In order to provide Link State Traffic Engineering features to IS-IS, this patch adds some modifications to base IS-IS: - Solve bug in lsp iterate function to avoid infinite loop in isis_lsp.c by adding condition to recurse call - Add new trigger event to parse LSP in isis_lsp.c - Add new TE debug flag to track Traffic Engineering events in isisd.[c,h] - Correct small bug in isis_tlvs.c where delay and min/max delay are not correctly handle - Handle Opaque LSA Traffic Engineering Zebra API in isis_zebra.[c,h] Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* isisd: Add support for RFC6119 (IPv6 TE in IS-IS)Olivier Dugeon2021-11-301-2/+14
| | | | | | | | | | | | | | - 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>
* isisd: Fix sending of LSP with null seqnoGuillaume Solignac2021-08-261-2/+2
| | | | | | Check sequence number when building LSP missing in received CSNP Signed-off-by: Guillaume Solignac <gsoligna@protonmail.com>
* isisd: fix setting IS type in LSPsIgor Ryzhov2021-07-131-1/+1
| | | | | | IS type in an LSP is a type of the router, not a type of the circuit. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* isisd: fix processing of the attached bitIgor Ryzhov2021-07-131-1/+4
| | | | | | | | | | There are two problems with the current code for processing the attached bit: - we should process it when acting both a level-1-only and level-1-2 - we should add the default route when we don't have L2 adjacensies, not when we don't have other routers configured on the device Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* isisd: fix setting of the attached bitIgor Ryzhov2021-07-131-60/+41
| | | | | | | | | Current code related to setting of the attached bit checks for existence of L2 adjacencies in other routers configured on the device. This makes no sense. We should check for L2 adjacencies in the same router where we have L1 adjacencies. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* isisd: per-instance dynamic hostname cacheIgor Ryzhov2021-06-111-6/+6
| | | | | | | | | | | | | Currently, the dynamic hostname cache is global. It is incorrect because neighbors in different VRFs may have the same system ID and different hostnames. This also fixes a memory leak - when the instance is deleted, the cache must be cleaned up and the cleanup thread must be cancelled. Fixes #8832. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* isisd: kill isis_memory.h, use MTYPE_STATICDavid Lamparter2021-03-221-0/+2
| | | | | | | Convert most DEFINE_MTYPE into the _STATIC variant, and move the remaining non-static ones to appropriate places. Signed-off-by: David Lamparter <equinox@diac24.net>
* isisd: Fix spelling mistakeDonald Sharp2021-03-211-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* isisd: avoid lsp_sched loop when unstableEmanuele Di Pascale2021-03-191-5/+15
| | | | | | | | no point in scheduling an LSP refresh immediately if we know it is going to be postponed again due to the network still being in its instability grace period Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* Merge pull request #7945 from volta-networks/feat_isis_snmpRenato Westphal2021-03-151-4/+4
|\ | | | | isisd: add support for read-only snmp mibs objects
| * isisd: support for snmplynne2021-03-021-4/+4
| | | | | | | | | | | | | | Add support for read only mib objects from RFC4444. Signed-off-by: Lynne Morrison <lynne@voltanet.io> Signed-off-by: Karen Schoener <karen@voltanet.io>
* | *: remove more sprintf()Quentin Young2021-02-091-6/+6
|/ | | | | | | Should be just a couple non-development, non-test occurrences of this function left now. Signed-off-by: Quentin Young <qlyoung@qlyoung.net>
* isisd: When adjacencies go up and down add support to modify attached-bitlynne2021-02-011-12/+66
| | | | | | | | | | | | When adjacencies change state the attached-bits in LSPs in other areas on the router may need to be modified. 1. If a router no longer has a L2 adjacency to another area the attached-bit must no longer be sent in the LSP 2. If a new L2 adjacency comes up in a different area then the attached-bit should be sent in the LSP Signed-off-by: Lynne Morrison <lynne@voltanet.io>
* isisd: Fix Attach-bit processinglynne2021-01-201-20/+71
| | | | | | | | | | | | | | | | | | | | | | | 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>
* *: Replace s_addr check agains 0 with INADDR_ANYDonatas Abraitis2020-12-141-1/+1
| | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* *: unify thread/event cancel macrosMark Stapp2020-10-231-4/+4
| | | | | | | | | Replace all lib/thread cancel macros, use thread_cancel() everywhere. Only the THREAD_OFF macro and thread_cancel() api are supported. Also adjust thread_cancel_async() to NULL caller's pointer (if present). Signed-off-by: Mark Stapp <mjs@voltanet.io>
* :* Convert prefix2str to %pFXDonatas Abraitis2020-10-221-15/+8
| | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* isisd: circuit->area->isis to circuit->isisDonald Sharp2020-10-091-4/+4
| | | | | | | | The code in isisd uses `circuit->area->isis` all the time but we know that circuit now has a valid `circuit->isis` pointer so let's use that and cleanup the long dereference. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* isisd: introduce two LSP iteration functionsRenato Westphal2020-08-271-0/+154
| | | | | | | | | | | | | | | | | | | Iterating over all IP or IS reachability information from a given LSP isn't a trivial task. That information is scattered throughout different TLV types, and which ones need to be used depend on multiple variables (e.g. the SPF tree address family, MT-ID, etc). This not to mention that an LSP might consist of multiple fragments. Introduce the following two LSP iteration function to facilitate obtaining IP/IS reachability information from a given LSP: * isis_lsp_iterate_ip_reach() * isis_lsp_iterate_is_reach() These functions will be used extensively by the upcoming TI-LFA code. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>