| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A configured flex-algo algorithm may remain in disabled state after its
definition is advertised on the area.
It happens sometimes that, in isis_sr_flex_algo_topo1 topotest step 4 or
8, flex-algo 203 is disabled. It depends on the following sequence:
1. Flex-algo 203 is configured on a remote router to be re-advertised.
2. A LSP is received on the local router and contains the algo 203
definition.
3. The local router re-builds its own LSP with lsp_build().
4. local router isis_run_spf() recomputes the algo 203 SPF tree.
A 1. 2. 3. 4. sequence results in a working test. The reception of the
remote LSP (2.) does not trigger the built of the local LSP. If for
some reasons, the sequence is 1. 3. 4. 2. 4., isis_run_spf() will not
knows that flex-algo 203 has been re-enabled because
flex_algo_get_state() only returns the state from the local LSP.
Compare in sequence step 4. the flex-algo state from the local LSP with
the actual state. If the state is not the same, request a new local LSP
generation and quits the re-computation of algo SPF tree. The SPF tree
will be recomputed just after the built of the local LSP.
Fixes: 3f55b8c621 ("isisd: fix disabled flex-algo on race condition")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
|\
| |
| | |
isisd, lib: fix flex-algo memory leak
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
isis_spftree_clear() calls:
- _isis_spftree_del() to partially delete a spftree instance
without freeing spftree->route_table and
spftree->route_table_backup.
- then _isis_spftree_init() that allocates new spftree->route_table
and spftree->route_table_backup.
As a consequence, the previous table instances are not referenced and
not freed.
Free the route tables before allocating new ones.
Fixes: 860b75b40e ("isisd: calculate flex-algo constraint spf")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| | |
Use the struct instead of the pointer for flex-algo memory allocation.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| | |
Fix a flex-algo data memory leak when a specific algorithm is removed.
Fixes: 7f198e063c ("isisd: add isis flex-algo base interface")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Free flex-algorithm database memory when an IS-IS area is destroyed.
Fixes: 735fb37db1 ("lib: add library for igp flexible-algorithm")
Fixes: 7f198e063c ("isisd: add isis flex-algo base interface")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: fixes for Flex-Algo
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
"show isis route algorithm ALGO json" display some text output before
printing the JSON one.
Do not print the text output in JSON mode.
Fixes: 0833c25180 ("isisd: add an algorithm argument to show isis route")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Reported by coverity scanner #1560315
Do not attempt to update the affinity map if the main isis struct is not
yet created.
Fixes: 9a65cf35da ("isisd: add affinity-map configuration hooks")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| | |
Fix a wrong pointer test issue reported by coverity scanner #1560314
Fixes: 860b75b40e ("isisd: calculate flex-algo constraint spf")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Reported by coverity scanner #1560313
Do not consider the affinity map is in use if the main isis struct is
not yet created.
Fixes: 9a65cf35da ("isisd: add affinity-map configuration hooks")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Coverity scanner reported the overrun issue #1560312 because
reach->id length is 7 bytes and we are trying to copy 8 bytes
(ie. ISIS_SYS_ID_LEN + 2).
Fix the issue by using the %pPN to display directly the 7 bytes
system-id.
Fixes: 860b75b40e ("isisd: calculate flex-algo constraint spf")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
|\ \
| |/
|/| |
lib: Update edge key in link state database
|
| |
| |
| |
| |
| |
| |
| |
| | |
Following the modification of the edge key in link state database
this patch updates the isis_te.c file to replace the old uint64_t edge key by
the new ls_edge_key structure.
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
|
| |
| |
| |
| |
| |
| |
| | |
Add the show isis flex-algo command to display the elected Flex-Algo
definitions and states (enabled/disabled).
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| | |
Add algorithm argument to show isis segment-routing node
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| | |
Add an optional algorithm argument to "show isis route" command.
Signed-off-by: Eric Kinzie <ekinzie@labn.net>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| | |
Add an optional algorithm argument to "show isis topology" command.
Signed-off-by: Eric Kinzie <ekinzie@labn.net>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| | |
Add flex-algo information ID to the SPF extreme debug mode.
Signed-off-by: Eric Kinzie <ekinzie@labn.net>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Append an optional parameter to "show isis route [prefix-sid]" that
formats the output as a JSON array.
Signed-off-by: Eric Kinzie <ekinzie@labn.net>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| | |
Show Prefix-SIDs and labels for all available Flex-Algos.
Signed-off-by: Eric Kinzie <ekinzie@labn.net>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| | |
Change the indentation to facilitate the reading of next commit.
No change on code.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| | |
clarify ifdef fabricd
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| | |
fix typo in indef fabricd comment
Fixes: 20bd27e2aa ("isisd, yang: add configuration model and callback stubs")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Add affinity-map hooks to check the utilization of affinity-map in
flex-algo contexts before its deletion and to update local TLVs when the
affinity-map bit-position is updated.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| | |
Add support of (ti-)lfa to flex-algo
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As isis_route_verify_merge() builds a new route table, each (src,dst)
new node in the table is created by merging data from the same (src,dst)
pair present in all route tables. However, as it iterates over those
route nodes and copies SR data into the newly created node, it repeatedly
overwrites the isis_route_info pointer. This, in turn, pollutes the
isis_route_info structures in all of the other tables with partially
updated SR data.
After a route is deleted, this leaves pointers to freed memory in one
of the route trees.
Fixes: 26b0598f6b6f ("isisd: fix isis_route_merge_verify logic")
Signed-off-by: Eric Kinzie <ekinzie@labn.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Create a temporary "merge" route table that contains the routing
information from all algorithms and install the merge route table
into the FIB.
Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Take into account the flex-algo affinity constraints to compute the SPF
tree.
Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add the support of ASLA with the following TLV:
- Extended IS Reachability (already defined TLV 22)
- Application-Specific Link Attributes (Sub-TLV 16)
(to enable the Flex-Algo flag on a link)
- Admin-group (Sub-Sub-TLV 3)
- Extended Admin-group (Sub-Sub-TLV 14)
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Add the backend 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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds basic functionality to Flex-Algo for IS-IS wrapping lib/flex_algo.
The configuration interface will be added in the next 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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Basically in frrouting source code principle,
the log string should not be a complicated abstraction
or streamlined for grep.
But for log format for the "TLV size does not match ..."
can be unified, which makes development easier.
> $ grep "TLV size does not match expected size for" isisd/isis_tlvs.c
> "TLV size does not match expected size for Administrative Group!\n");
> "TLV size does not match expected size for Local IPv6 address!\n");
> ...(snip)...
> "TLV size does not match expected size for Adjacency SID!\n");
> "TLV size does not match expected size for Adjacency SID!\n");
> "TLV size does not match expected size for Adjacency SID!\n");
> "TLV size does not match expected size for LAN-Adjacency SID!\n");
> "TLV size does not match expected size for LAN-Adjacency SID!\n");
> "TLV size does not match expected size for LAN-Adjacency SID!\n");
>
> $ grep "TLV size does not match expected size for" isisd/isis_tlvs.c | wc -l
> 25
Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Many of the enum definitions defined in isis_tlvs.h
are often extended at the end. The c/c++ allows
commas at the end of a list. This commit simplifies
the patching of later extensions.
Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before this commit, there was only one sr psid info
included in route_info.
In fact, in RFC8667, Algorithm ID, which is a property of
Prefix-SID, has 8 bits of information. That is, each Prefix
can hold up to 256 Prefix-SIDs. This commit implements it.
The previously implemented single Prefix-SID will be
continued as Algorithm 0.
Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Prefix-SID nexthops and backup nexthops are stored respectively in
isis_route_info->nexthops and isis_route_info->backup->nexthops.
With Flex-Algo, there are multiple Prefix-SIDs for a single prefix in
different algorithms. Each of these Prefix-SIDs performs SPF calculation
with a separate contract and sets a nexthops, so it is necessary to
store a different set nexthops for each Prefix-SID.
Add a nexthops and backup nethops list into the Prefix-SID
isis_sr_psid_info struct and use these lists instead of the when needed
After this commit, the nexthops for each Prefix-SID is not
taken from route_info, but the nexthop set inside the
Prefix-SID is taken. This works for backup nexthops as well.
Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
SR Algorithms are independent of specific IGPs
such as IS-IS. This commit adds lib/sr to
aggregate IGP agnostic functions and constants.
Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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: Eric Kinzie <ekinzie@labn.net>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The spftree has a new property called algorithm
which is id used to identify the algorithm that
separates it in the same IGP network. This is
used in Flex-Algo. In other cases than Flex-Algo,
the algorithm id is always zero.
Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
|\ \
| | |
| | | |
isisd: Add support for log-pdu-drops
|