]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
2 years agobgpd: Coverity mistakenly believes we can fall through
Donald Sharp [Fri, 21 Apr 2023 11:57:19 +0000 (07:57 -0400)]
bgpd: Coverity mistakenly believes we can fall through

Coverity has incorrectly found that a switch statement
can be fallen through.  It is missing the fact that the
previous case statement has a return through every path
it can get too.  Let's just appease coverity

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: All paths have already de-refed rd_str
Donald Sharp [Fri, 21 Apr 2023 11:54:00 +0000 (07:54 -0400)]
bgpd: All paths have already de-refed rd_str

Coverity points out that rd_str has already been
deref'ed in all paths leading to this spot.  No
need to keep at it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #12933 from Orange-OpenSource/link_state
Philippe Guibert [Thu, 20 Apr 2023 16:33:21 +0000 (18:33 +0200)]
Merge pull request #12933 from Orange-OpenSource/link_state

lib: Update edge key in link state database

2 years agoMerge pull request #13329 from Pdoijode/pdoijode/bgp-attr-crash-fix
Donatas Abraitis [Wed, 19 Apr 2023 18:48:34 +0000 (21:48 +0300)]
Merge pull request #13329 from Pdoijode/pdoijode/bgp-attr-crash-fix

bgpd: Fix for ain->attr corruption during path update

2 years agoMerge pull request #13166 from Jafaral/ospf-external-metric
Donatas Abraitis [Wed, 19 Apr 2023 18:11:25 +0000 (21:11 +0300)]
Merge pull request #13166 from Jafaral/ospf-external-metric

ospfd: use rib metric as the base for set metric +/-

2 years agobgpd: Fix for ain->attr corruption during path update 13329/head
Pooja Jagadeesh Doijode [Wed, 19 Apr 2023 01:40:06 +0000 (18:40 -0700)]
bgpd: Fix for ain->attr corruption during path update

1. Consider a established L2VPN EVPN BGP peer with soft-reconfiguartion
   inbound configured

2. When the interface of this directly connected BGP peer is shutdown,
   bgp_soft_reconfig_table_update() is called, which memsets the evpn buffer
   and calls bgp_update() with received attributes stored in ain table(ain->attr).
   In bgp_update(), evpn_overlay attribute in ain->attr (which is an interned
   attr) was modified by doing a memcpy

3. Above action causes 2 attributes in the attrhash (which were previously different)
   to match!

4. Later during fsm change event of the peer, bgp_adj_in_remove() is called
   to clean up the ain->attr. But, because 2 attrs in attrhash match, it causes
   BGP to assert in bgp_attr_unintern()

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
2 years agoMerge pull request #13323 from LabNConsulting/style-update 13324/head
Mark Stapp [Tue, 18 Apr 2023 17:13:35 +0000 (13:13 -0400)]
Merge pull request #13323 from LabNConsulting/style-update

style: add format checker config and remove .dir-locals.el

2 years agoMerge pull request #11667 from louis-6wind/flexalgo-mpls
Olivier Dugeon [Tue, 18 Apr 2023 12:45:30 +0000 (14:45 +0200)]
Merge pull request #11667 from louis-6wind/flexalgo-mpls

isisd: Flex-Algo for SR-MPLS

2 years agoMerge pull request #13236 from Orange-OpenSource/ospf-te
Russ White [Tue, 18 Apr 2023 12:32:20 +0000 (08:32 -0400)]
Merge pull request #13236 from Orange-OpenSource/ospf-te

ospfd: Force Opaque LSA & co to default VRF

2 years agodoc: add isisd flex-algo documentation 11667/head
Louis Scalbert [Mon, 29 Aug 2022 11:32:20 +0000 (13:32 +0200)]
doc: add isisd flex-algo documentation

Add the isisd flex-algo documentation

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agodoc: fix debugging-isis reference
Louis Scalbert [Tue, 6 Sep 2022 14:25:55 +0000 (16:25 +0200)]
doc: fix debugging-isis reference

Debugging-isis tag was moved.

Move it to right place.

Fixes: 9389175b75 ("doc: add documentation for IS-IS Segment Routing")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agotests: add isis_sr_flex_algo_topo2 for flex-algo
Hiroki Shirokura [Sun, 21 Nov 2021 10:07:32 +0000 (10:07 +0000)]
tests: add isis_sr_flex_algo_topo2 for flex-algo

Add a topotest with 9 flex-algo routers to check each router's MPLS
table.

Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agotests: add isis_sr_flex_algo_topo1 for flex-algo
Hiroki Shirokura [Sun, 21 Nov 2021 10:07:27 +0000 (10:07 +0000)]
tests: add isis_sr_flex_algo_topo1 for flex-algo

Add a topotest to check some Flex-Algo configuration changes.

Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agoisisd: add "show isis flex-algo" command
Louis Scalbert [Mon, 12 Dec 2022 15:12:41 +0000 (16:12 +0100)]
isisd: add "show isis flex-algo" command

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>
2 years agoisisd: add algorithm argument to show isis segment-routing node
Louis Scalbert [Mon, 12 Dec 2022 14:59:19 +0000 (15:59 +0100)]
isisd: add algorithm argument to show isis segment-routing node

Add algorithm argument to show isis segment-routing node

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agoisisd: add an algorithm argument to show isis route
Louis Scalbert [Tue, 6 Sep 2022 15:08:57 +0000 (17:08 +0200)]
isisd: add an algorithm argument to show isis route

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>
2 years agoisisd: add an algorithm argument to show isis topology
Louis Scalbert [Tue, 6 Sep 2022 15:06:55 +0000 (17:06 +0200)]
isisd: add an algorithm argument to show isis topology

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>
2 years agoisisd: add flex-algo info to spf extreme debug
Louis Scalbert [Tue, 30 Aug 2022 09:21:20 +0000 (11:21 +0200)]
isisd: add flex-algo info to spf extreme debug

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>
2 years agoisisd: add option to display isis routes as json
Eric Kinzie [Fri, 2 Sep 2022 14:33:52 +0000 (16:33 +0200)]
isisd: add option to display isis routes as json

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>
2 years agoisisd: show non-zero algos in "show isis route prefix-sid" (2/2)
Eric Kinzie [Fri, 2 Sep 2022 14:33:43 +0000 (16:33 +0200)]
isisd: show non-zero algos in "show isis route prefix-sid" (2/2)

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>
2 years agoisisd: show non-zero algos in "show isis route prefix-sid" (1/2)
Louis Scalbert [Mon, 12 Sep 2022 12:57:51 +0000 (14:57 +0200)]
isisd: show non-zero algos in "show isis route prefix-sid" (1/2)

Change the indentation to facilitate the reading of next commit.
No change on code.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agolib: convert termtable to json
Eric Kinzie [Fri, 2 Sep 2022 14:33:21 +0000 (16:33 +0200)]
lib: convert termtable to json

Add a function that returns a JSON-C structure containing a representation
of a termtable.  This is intended to be a quick way to implement JSON
output to CLI commands.

Signed-off-by: Eric Kinzie <ekinzie@labn.net>
2 years agoisisd: clarify ifdef fabricd
Louis Scalbert [Mon, 27 Feb 2023 15:54:09 +0000 (16:54 +0100)]
isisd: clarify ifdef fabricd

clarify ifdef fabricd

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agoisisd: fix typo in indef fabricd comment
Louis Scalbert [Mon, 27 Feb 2023 13:51:53 +0000 (14:51 +0100)]
isisd: fix typo in indef fabricd comment

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>
2 years agoisisd: add affinity-map configuration hooks
Louis Scalbert [Thu, 10 Nov 2022 15:36:08 +0000 (16:36 +0100)]
isisd: add affinity-map configuration hooks

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>
2 years agoisisd: add support of (ti-)lfa to flex-algo
Louis Scalbert [Mon, 12 Dec 2022 16:22:56 +0000 (17:22 +0100)]
isisd: add support of (ti-)lfa to flex-algo

Add support of (ti-)lfa to flex-algo

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agoisisd: fix merging flex-algo route nodes
Eric Kinzie [Fri, 1 Apr 2022 00:47:30 +0000 (00:47 +0000)]
isisd: fix merging flex-algo route nodes

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>
2 years agoisisd: merge algorithm tables
Hiroki Shirokura [Fri, 21 Jan 2022 16:02:54 +0000 (16:02 +0000)]
isisd: merge algorithm tables

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>
2 years agoisisd: calculate flex-algo constraint spf
Hiroki Shirokura [Fri, 21 Jan 2022 14:54:15 +0000 (14:54 +0000)]
isisd: calculate flex-algo constraint spf

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>
2 years agoisisd: add isis flex-algo lsp advertisement
Hiroki Shirokura [Tue, 4 Jan 2022 01:31:45 +0000 (01:31 +0000)]
isisd: add isis flex-algo lsp advertisement

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>
2 years agoisisd: add ASLA support
Louis Scalbert [Mon, 12 Dec 2022 15:00:58 +0000 (16:00 +0100)]
isisd: add ASLA support

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>
2 years agoisisd: add isis flex-algo configuration frontend
Hiroki Shirokura [Sat, 18 Dec 2021 08:54:52 +0000 (08:54 +0000)]
isisd: add isis flex-algo configuration frontend

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>
2 years agostyle: add format checker config that matches FRR style standards 13323/head
Christian Hopps [Tue, 18 Apr 2023 09:12:58 +0000 (05:12 -0400)]
style: add format checker config that matches FRR style standards

Also move .dir-locals.el to a sample file. This file should not be
in the repository as it affects the user's ability to modify it.

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoospfd: Force Opaque LSA & co to default VRF 13236/head
Olivier Dugeon [Fri, 7 Apr 2023 20:48:24 +0000 (22:48 +0200)]
ospfd: Force Opaque LSA & co to default VRF

Ospf segfault when Router Information is enabled in a non default VRF,
see issue #13144.

This patch forces vrf_id to default VRF for Opaque LSA and extension based
on Opaque LSA: Router Information, Traffic Engineering, Extended Prefix,
Extended Link and Segment Routing. Indeed, non default VRF is not yet
supported for Opaque LSA & co.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2 years agoisisd: add isis flex-algo configuration backend
Hiroki Shirokura [Sat, 18 Dec 2021 08:23:16 +0000 (08:23 +0000)]
isisd: add isis flex-algo configuration backend

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>
2 years agoisisd: add isis flex-algo base interface
Hiroki Shirokura [Sun, 12 Dec 2021 09:43:37 +0000 (09:43 +0000)]
isisd: add isis flex-algo base interface

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>
2 years agolib: add a frr_each_const macro
Louis Scalbert [Tue, 13 Sep 2022 12:03:23 +0000 (14:03 +0200)]
lib: add a frr_each_const macro

Add a frr_each_const macro equivalent to loop on const lists.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agolib,vtysh,isisd,yang: algo cli/yang/callbacks
Hiroki Shirokura [Sat, 18 Dec 2021 08:11:58 +0000 (08:11 +0000)]
lib,vtysh,isisd,yang: algo cli/yang/callbacks

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>
2 years agolib: add library for igp flexible-algorithm
Hiroki Shirokura [Sat, 22 Jan 2022 11:08:05 +0000 (11:08 +0000)]
lib: add library for igp flexible-algorithm

Add a library to deal with Flexible Algorithm that will be common to
IS-IS and OSPF. The functions enables to deal with:

- Affinity-maps
- Extended Admin Group (RFC7308)
- Flex-Algo structures that contains the flex-algo configurations

Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agoisisd: add cli to configure algorithm-prefix-sid
Hiroki Shirokura [Sun, 12 Dec 2021 12:00:24 +0000 (12:00 +0000)]
isisd: add cli to configure algorithm-prefix-sid

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>
2 years agoisisd,yang: add algorithm-prefix-sid configuration tree
Hiroki Shirokura [Sun, 12 Dec 2021 11:56:44 +0000 (11:56 +0000)]
isisd,yang: add algorithm-prefix-sid configuration tree

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>
2 years agoisisd: add TLV_SIZE_MISMATCH for tlvs length mismatch
Hiroki Shirokura [Tue, 4 Jan 2022 01:13:50 +0000 (01:13 +0000)]
isisd: add TLV_SIZE_MISMATCH for tlvs length mismatch

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>
2 years agoisisd: refactor enum tail comma
Hiroki Shirokura [Mon, 3 Jan 2022 22:53:52 +0000 (22:53 +0000)]
isisd: refactor enum tail comma

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>
2 years agoisisd: update struct isis_route_info has multiple sr info by algorithm
Hiroki Shirokura [Sun, 12 Dec 2021 09:20:21 +0000 (09:20 +0000)]
isisd: update struct isis_route_info has multiple sr info by algorithm

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>
2 years agoisisd: update struct isis_sr_psid_info with nh context
Hiroki Shirokura [Tue, 4 Jan 2022 08:15:56 +0000 (08:15 +0000)]
isisd: update struct isis_sr_psid_info with nh context

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>
2 years agoisisd: refactor IP reachability lsp build
Louis Scalbert [Thu, 15 Dec 2022 13:02:46 +0000 (14:02 +0100)]
isisd: refactor IP reachability lsp build

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>
2 years agoisisd: update isis_tlvs_add_*_reach() with multi algorithm
Hiroki Shirokura [Sat, 11 Dec 2021 06:22:42 +0000 (06:22 +0000)]
isisd: update isis_tlvs_add_*_reach() with multi algorithm

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>
2 years agoisisd: update SR_ALGORITHM_COUNT to 256
Hiroki Shirokura [Sat, 18 Dec 2021 09:03:01 +0000 (09:03 +0000)]
isisd: update SR_ALGORITHM_COUNT to 256

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>
2 years agolib,isisd: refactor igp-agnostic sr misc functions
Hiroki Shirokura [Sat, 22 Jan 2022 11:07:40 +0000 (11:07 +0000)]
lib,isisd: refactor igp-agnostic sr misc functions

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>
2 years agodoc: document the new set min/max metric commands 13166/head
Jafar Al-Gharaibeh [Tue, 18 Apr 2023 05:43:29 +0000 (00:43 -0500)]
doc: document the new set min/max metric commands

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agotests: add a topotest for ospf metric propagation across vrfs/protocols
Jafar Al-Gharaibeh [Thu, 23 Mar 2023 04:15:01 +0000 (23:15 -0500)]
tests: add a topotest for ospf metric propagation across vrfs/protocols

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agoospfd: handle type-7 routes
Jafar Al-Gharaibeh [Thu, 6 Apr 2023 19:55:03 +0000 (14:55 -0500)]
ospfd: handle type-7 routes

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agolib, ospfd, yang: add route map set for min/max metric
Jafar Al-Gharaibeh [Thu, 6 Apr 2023 04:55:13 +0000 (23:55 -0500)]
lib, ospfd, yang: add route map set for min/max metric

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agoospfd: use rib metric as the base for set metric +/-
Jafar Al-Gharaibeh [Fri, 31 Mar 2023 03:36:13 +0000 (22:36 -0500)]
ospfd: use rib metric as the base for set metric +/-

When using route maps with external routes in OSPF as follows:
```
   set metric +10
 ```
The current behavior is to use the default ospf metric as the base and then add
to 10 to it. The behavior isn't useful as-is. A value 30 (20 dfeault + 10) can
be set directly instead. the behavior is also not consistent with bgp. bgp does
use the rib metric in this case as the base. The current behavior also doesn't
allow the metric to accumulate when crossing different routing domains such as
vrfs causing the metric to reset every time the route enters a new vrf with a new
ospf network.

This PR changes the behavior such that the rib metric is used as a base for
ospf exteral routes when used with `set metric -/+`

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agoMerge pull request #13319 from anlancs/pimd-wrong-comment-nht
mobash-rasool [Mon, 17 Apr 2023 18:37:04 +0000 (00:07 +0530)]
Merge pull request #13319 from anlancs/pimd-wrong-comment-nht

pimd: Correct the wrong comment

2 years agoMerge pull request #13230 from LabNConsulting/micronet-is-munet
Donald Sharp [Mon, 17 Apr 2023 17:35:29 +0000 (13:35 -0400)]
Merge pull request #13230 from LabNConsulting/micronet-is-munet

Micronet is munet

2 years agoMerge pull request #13321 from louis-6wind/doc-affinitymap
Donatas Abraitis [Mon, 17 Apr 2023 12:40:19 +0000 (15:40 +0300)]
Merge pull request #13321 from louis-6wind/doc-affinitymap

doc: include affinity-maps into index

2 years agoMerge pull request #13320 from LabNConsulting/fix-show-opdata-command
Donatas Abraitis [Mon, 17 Apr 2023 11:51:38 +0000 (14:51 +0300)]
Merge pull request #13320 from LabNConsulting/fix-show-opdata-command

Fix show opdata command

2 years agodoc: include affinity-maps into index 13321/head
Louis Scalbert [Mon, 17 Apr 2023 09:24:34 +0000 (11:24 +0200)]
doc: include affinity-maps into index

Include affinity-maps documentation into index under "basics".

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agoisisd: update struct isis_sr_psid_info with algorithm id
Hiroki Shirokura [Sat, 11 Dec 2021 03:01:07 +0000 (03:01 +0000)]
isisd: update struct isis_sr_psid_info with algorithm id

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>
2 years agoisisd: update struct sr_prefix_cfg with algorithm id
Hiroki Shirokura [Sat, 11 Dec 2021 02:21:30 +0000 (02:21 +0000)]
isisd: update struct sr_prefix_cfg with algorithm id

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>
2 years agoisisd: update struct isis_spftree with algorithm id
Hiroki Shirokura [Sat, 11 Dec 2021 02:09:23 +0000 (02:09 +0000)]
isisd: update struct isis_spftree with algorithm id

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>
2 years agoMerge pull request #12550 from AbhishekNR/mld_join
Donatas Abraitis [Mon, 17 Apr 2023 08:01:21 +0000 (11:01 +0300)]
Merge pull request #12550 from AbhishekNR/mld_join

pim6d: Implementing "ipv6 mld join"

2 years agoMerge pull request #13318 from chiragshah6/fdev1
Donatas Abraitis [Mon, 17 Apr 2023 06:55:58 +0000 (09:55 +0300)]
Merge pull request #13318 from chiragshah6/fdev1

bgpd: EVPN MH add correct value into dfAlgorithm json output

2 years agotests: use a more specific xpath for finding the route JSON data 13320/head
Christian Hopps [Mon, 17 Apr 2023 05:36:46 +0000 (01:36 -0400)]
tests: use a more specific xpath for finding the route JSON data

Rather than requesting the data for the entire model, just request the route
data for the specific prefix. This also tests the xpath code (which was
previously broken).

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agotests: use `shlex.quote` to pass command arg to vtysh
Christian Hopps [Mon, 17 Apr 2023 05:07:12 +0000 (01:07 -0400)]
tests: use `shlex.quote` to pass command arg to vtysh

This makes sure any included quotation is properly escaped and passed
through to vtysh.

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agotests: quick fix for --gdb-daemons=DAEMONLIST not working
Christian Hopps [Mon, 17 Apr 2023 05:34:46 +0000 (01:34 -0400)]
tests: quick fix for --gdb-daemons=DAEMONLIST not working

When launching the daemons under gdb it takes a bit for them to come up, the
currently code only looks for pid files to determine if the daemon is running.
This test is no good as these files are left around by previous runs.

For now do a simple sleep when debugging with gdb to get things working.

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agolib: always check for error, don't count on dnode being NULL
Christian Hopps [Mon, 17 Apr 2023 05:33:46 +0000 (01:33 -0400)]
lib: always check for error, don't count on dnode being NULL

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agolib: always return valid data format for show yang command.
Christian Hopps [Mon, 17 Apr 2023 05:29:33 +0000 (01:29 -0400)]
lib: always return valid data format for show yang command.

For JSON return `{}` for XPath return an XML comment `<!-- Not found -->`

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agolib: fix broken "show yang operational-data" functionality
Christian Hopps [Mon, 17 Apr 2023 05:16:32 +0000 (01:16 -0400)]
lib: fix broken "show yang operational-data" functionality

Previously was using an API that returned the root of the data tree given the
users input xpath value, and then used it like it was the leaf node (last not
first). So basically this CLI command only worked when one requested the root
node of the model.

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agolib: add and use new yang function for finding schema nodes
Christian Hopps [Mon, 17 Apr 2023 05:09:05 +0000 (01:09 -0400)]
lib: add and use new yang function for finding schema nodes

Add a wrapper around lys_find_xpath which has an unfortunate API
returning an allocated set of schema nodes when we only ever expect and
want one.

Another libyang function `lys_find_path` returns a single node; however,
that function can assert/abort on invalid path values so is unsuitable
for user input.

Replace previous uses of `lys_find_path` with new API when dealing with
possible invalid path values (i.e., from a user).

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agopimd: Correct the wrong comment 13319/head
anlan_cs [Sun, 16 Apr 2023 13:26:36 +0000 (21:26 +0800)]
pimd: Correct the wrong comment

Currently the function `pim_parse_nexthop_update()` clearly
updates nexthop interfaces even as PIM-disabled.

Just correct the wrong comments about those PIM-disabled interfaces
to avoid misleading.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #13141 from mjstapp/fix_ospf_json_keys
Donatas Abraitis [Sun, 16 Apr 2023 18:33:20 +0000 (21:33 +0300)]
Merge pull request #13141 from mjstapp/fix_ospf_json_keys

ospfd: remove deprecated json attrs for neighbor show

2 years agobgpd:add correct value into dfAlgorithm json output 13318/head
Sindhu Parvathi Gopinathan [Sun, 16 Apr 2023 06:16:01 +0000 (23:16 -0700)]
bgpd:add correct value into dfAlgorithm json output

FRR "show bgp l2 evpn es <esi-id> json" output shows 'dfAlgorithm'
same as 'dfPreference' value instead of algorithm.

Modified the code to set the correct DF algorithm value into
'dfAlgorithm' field.

torm-11# show bgp l2 evpn es
ES Flags: B - bypass, L local, R remote, I inconsistent
VTEP Flags: E ESR/Type-4, A active nexthop
ESI                            Flags RD                    #VNIs
VTEPs
03:44:38:39:ff:ff:01:00:00:01  LR    27.0.0.15:15          10
27.0.0.16(EA),27.0.0.17(EA)
03:44:38:39:ff:ff:01:00:00:02  LR    27.0.0.15:16          10
27.0.0.16(EA),27.0.0.17(EA)
03:44:38:39:ff:ff:01:00:00:03  LR    27.0.0.15:17          10
27.0.0.16(EA),27.0.0.17(EA)
03:44:38:39:ff:ff:02:00:00:01  R     -                     10
27.0.0.18(A),27.0.0.19(A),27.0.0.20(A)
03:44:38:39:ff:ff:02:00:00:02  R     -                     10
27.0.0.18(A),27.0.0.19(A),27.0.0.20(A)
03:44:38:39:ff:ff:02:00:00:03  R     -                     10
27.0.0.18(A),27.0.0.19(A),27.0.0.20(A)
torm-11#

Before Fix:-
```
torm-11# show bgp l2 evpn es 03:44:38:39:ff:ff:01:00:00:01 json
{
  "esi":"03:44:38:39:ff:ff:01:00:00:01",
  "rd":"27.0.0.15:15",
  "type":[
    "local",
    "remote"
  ],
  "vteps":[
    {
      "vtep_ip":"27.0.0.16",
      "flags":[
        "esr",
        "active"
      ],
      "dfPreference":32767,
      "dfAlgorithm":32767 =====> dfAlgorithm is same as dfPreference
    },
    {
      "vtep_ip":"27.0.0.17",
      "flags":[
        "esr",
        "active"
      ],
      "dfPreference":32767,
      "dfAlgorithm":32767 =====> dfAlgorithm is same as dfPreference
    }
  ],
  "flags":[
    "up",
    "advertiseEVI"
  ],
  "originator_ip":"27.0.0.15",
  "remoteVniCount":10,
  "vrfCount":3,
  "macipPathCount":33,
  "macipGlobalPathCount":264,
  "inconsistentVniVtepCount":0,
  "localEsDfPreference":50000,
  "fragments":[
    {
      "rd":"27.0.0.15:15",
      "eviCount":10
    }
  ]
}
torm-11#
```

After Fix:-

```
torm-11# show bgp l2vpn evpn es 03:44:38:39:ff:ff:01:00:00:01 json
{
  "esi":"03:44:38:39:ff:ff:01:00:00:01",
  "rd":"27.0.0.15:4",
  "type":[
    "local",
    "remote"
  ],
  "vteps":[
    {
      "vtep_ip":"27.0.0.16",
      "flags":[
        "esr",
        "active"
      ],
      "dfPreference":32767,
      "dfAlgorithm":"preference" ---- dfAlgorithm shows properly
    },
    {
      "vtep_ip":"27.0.0.17",
      "flags":[
        "esr",
        "active"
      ],
      "dfPreference":32767,
      "dfAlgorithm":"preference" --- dfAlgorithm shows properly
    }
  ],
  "vniCount":10,
  "flags":[
    "up",
    "advertiseEVI"
  ],
  "originator_ip":"27.0.0.15",
  "remoteVniCount":10,
  "vrfCount":3,
  "macipPathCount":33,
  "macipGlobalPathCount":264,
  "inconsistentVniVtepCount":0,
  "localEsDfPreference":50000,
  "fragments":[
    {
      "rd":"27.0.0.15:4",
      "eviCount":10
    }
  ]
}
torm-11#
```

Ticket:#3411912

Issue:3411912

Testing: UT done

Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
2 years agoMerge pull request #13314 from anlancs/bgp/remove-check-group
Donatas Abraitis [Sun, 16 Apr 2023 08:52:42 +0000 (11:52 +0300)]
Merge pull request #13314 from anlancs/bgp/remove-check-group

bgpd: Remove unnecessary check for groups

2 years agoMerge pull request #13312 from chiragshah6/fdev2
Donatas Abraitis [Sun, 16 Apr 2023 08:27:53 +0000 (11:27 +0300)]
Merge pull request #13312 from chiragshah6/fdev2

zebra: EVPN MH ES-peer Sync MAC installed as inactive

2 years agoMerge pull request #13302 from anlancs/fix/reload-remote-as
Donatas Abraitis [Sun, 16 Apr 2023 06:50:40 +0000 (09:50 +0300)]
Merge pull request #13302 from anlancs/fix/reload-remote-as

tools: fix missing remote-as configuration when reload

2 years agobgpd: Remove unnecessary check for groups 13314/head
anlan_cs [Sun, 16 Apr 2023 05:41:40 +0000 (13:41 +0800)]
bgpd: Remove unnecessary check for groups

The `NULL` check for newly created groups (`updgroup` and `subgroup`)
are unnecessary,  just remove them.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agotests: switch to munet 13230/head
Christian Hopps [Fri, 24 Mar 2023 13:06:38 +0000 (13:06 +0000)]
tests: switch to munet

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoMerge pull request #13313 from LabNConsulting/cleanup-bad-warning
Jafar Al-Gharaibeh [Sat, 15 Apr 2023 17:18:08 +0000 (12:18 -0500)]
Merge pull request #13313 from LabNConsulting/cleanup-bad-warning

tests: restart bgpd to avoid warnings in follow on tests

2 years agotests: restart bgpd to avoid warnings in follow on tests 13313/head
Christian Hopps [Sat, 15 Apr 2023 13:37:30 +0000 (09:37 -0400)]
tests: restart bgpd to avoid warnings in follow on tests

The tests are killing bgpd and then ending, the next test is checking for all
daemons running and spewing warnings to stderr. Restart the daemons before
ending the test (like other tests in this same module) to avoid this.

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agotests: import munet 0.12.12
Christian Hopps [Sat, 15 Apr 2023 10:43:49 +0000 (06:43 -0400)]
tests: import munet 0.12.12

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoMerge pull request #13311 from LabNConsulting/fix-python-warning
Donald Sharp [Sat, 15 Apr 2023 00:21:25 +0000 (20:21 -0400)]
Merge pull request #13311 from LabNConsulting/fix-python-warning

tests: fix warning, incorrect use of `is` use ==

2 years agotools: Make check flag really work for reload 13302/head
anlan_cs [Fri, 14 Apr 2023 22:41:41 +0000 (06:41 +0800)]
tools: Make check flag really work for reload

The check flag of `found_pg_cmd` is already there, but not used.
So, make it really work for reload.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agotools: fix missing remote-as configuration when reload
anlan_cs [Fri, 14 Apr 2023 00:32:32 +0000 (08:32 +0800)]
tools: fix missing remote-as configuration when reload

From commit `411d1a2`, `bgp_delete_nbr_remote_as_line()` is added to
remove some specific bgp neighbors.  But, when reloading the following
configuration, it will wrongly remove some good ones:
`neighbor 66.66.66.6 remote-as internal`:

```
router bgp 66
 bgp router-id 172.16.204.6
 neighbor ANLAN peer-group
 neighbor ANLAN remote-as internal
 neighbor 66.66.66.6 remote-as internal <- LOST
 neighbor 66.66.66.60 peer-group ANLAN
```

The reason is that "66.66.66.6" is included in "66.66.66.60" literally,
then it is mistakenly thought to be a match.  Just fix it with
excat match.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agozebra: evpn mh sync mac install as inactive 13312/head
Chirag Shah [Fri, 14 Apr 2023 19:57:23 +0000 (12:57 -0700)]
zebra: evpn mh sync mac install as inactive

EVPN MH ES reduendant VTEPs need to install
sync MAC as notify inactive and generate
ND:Proxy stamped extended community on Type-2
route.

Ticket:#3436621
Issue:3436621

Testing Done:

tor-11 originates type-2 MAC route:

tor-11# bridge -d fdb show | grep 00:65:00:00:00:01
00:65:00:00:00:01 dev hostbond1 vlan 1000 notify master bridge static

tor-12 receives sync MAC route:

Before fix:
----------
tor-12:/# bridge -d fdb show | grep 00:65:00:00:00:01
00:65:00:00:00:01 dev hostbond1 vlan 1000 notify master bridge static

After fix: inactive is set to MAC entry
----------
tor-12:/#bridge -d fdb show | grep 00:65:00:00:00:01
00:65:00:00:00:01 dev hostbond1 vlan 1000 notify inactive master bridge
static

Notice the difference in `inactive` post notify on tor-12
with the fix.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2 years agotests: fix warning, incorrect use of `is`. 13311/head
Christian Hopps [Fri, 14 Apr 2023 19:13:04 +0000 (15:13 -0400)]
tests: fix warning, incorrect use of `is`.

Remove the never-executed code.

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoMerge pull request #13303 from pguibert6WIND/srv6_seg6local_defaultvrf
Donald Sharp [Fri, 14 Apr 2023 14:36:12 +0000 (10:36 -0400)]
Merge pull request #13303 from pguibert6WIND/srv6_seg6local_defaultvrf

lib: fix handle seg6local routes on default vrf

2 years agoMerge pull request #13308 from donaldsharp/if_pr_needs
Donatas Abraitis [Fri, 14 Apr 2023 14:03:09 +0000 (17:03 +0300)]
Merge pull request #13308 from donaldsharp/if_pr_needs

git: Workflow grammar fixup

2 years agogit: Workflow grammar fixup 13308/head
Donald Sharp [Fri, 14 Apr 2023 13:55:28 +0000 (09:55 -0400)]
git: Workflow grammar fixup

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #13297 from donaldsharp/ospf6_missing_nh
Jafar Al-Gharaibeh [Fri, 14 Apr 2023 13:09:04 +0000 (08:09 -0500)]
Merge pull request #13297 from donaldsharp/ospf6_missing_nh

ospf6d: missing ECMP NHs in certain topologies

2 years agoMerge pull request #13300 from louis-6wind/iso_doc
Donald Sharp [Fri, 14 Apr 2023 13:05:47 +0000 (09:05 -0400)]
Merge pull request #13300 from louis-6wind/iso_doc

doc: fix the print iso macro documentation

2 years agoMerge pull request #13301 from opensourcerouting/fix/crash_bgp_received_routes
Donald Sharp [Fri, 14 Apr 2023 13:04:07 +0000 (09:04 -0400)]
Merge pull request #13301 from opensourcerouting/fix/crash_bgp_received_routes

bgpd: Fix crash for `show bgp ... neighbor received-routes detail|PREFIX

2 years agolib: fix handle seg6local routes on default vrf 13303/head
Philippe Guibert [Fri, 14 Apr 2023 08:44:41 +0000 (10:44 +0200)]
lib: fix handle seg6local routes on default vrf

An L3VPN network can be configured on the main BGP instance,
with an SRv6 SID. By declaring a network, a seg6local route
is created but remains invalid.

The below BGP VPN configuration the default VRF has been
used:
> router bgp 1
>  address-family ipv6 unicast
>   sid vpn export auto
>   rd vpn export 1:30
>   rt vpn both 77:77
>   import vpn
>   export vpn
>   network 2001:7::/64
>  exit-address-family

The below seg6local route has been added:

> # show ipv6 route
> [..]
> B   2001:db8:2:2:300::/128 [20/0] is directly connected, unknown inactive, seg6local End.DT6 table 254, seg6 ::, weight 1, 00:00:07
>

When creating the seg6local route, an interface is used as nexthop.
The interface index is obtained from the vrf identifier. This is
true when using VRF interfaces, but is wrong when using the lo
interface which usually has the '1' ifindex whereas the vrf id for
the default VRF is 0.

Get the appropriate index from the vrf identifier.
The below seg6local route is visible:

> # show ipv6 route
> [..]
> B>* 2001:db8:1:1:300::/128 [20/0] is directly connected, lo, seg6local End.DT6 table 254, seg6 ::, weight 1, 00:00:15
>

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agobgpd: Fix crash for `show bgp ... neighbor received-routes detail|PREFIX` 13301/head
Donatas Abraitis [Thu, 13 Apr 2023 20:37:06 +0000 (23:37 +0300)]
bgpd: Fix crash for `show bgp ... neighbor received-routes detail|PREFIX`

BGP: Received signal 11 at 1681287514 (si_addr 0x8, PC 0x559ab42eb1d9); aborting...
BGP: /lib/libfrr.so.0(zlog_backtrace_sigsafe+0x71) [0x7f4356b19af1]
BGP: /lib/libfrr.so.0(zlog_signal+0xf9) [0x7f4356b19cf9]
BGP: /lib/libfrr.so.0(+0xf5af5) [0x7f4356b4baf5]
BGP: /lib/x86_64-linux-gnu/libpthread.so.0(+0x14420) [0x7f43568ab420]
BGP: /usr/lib/frr/bgpd(prefix_rd2str+0x29) [0x559ab42eb1d9]
BGP: /usr/lib/frr/bgpd(route_vty_out_detail_header+0x7ca) [0x559ab43061ba]
BGP: /usr/lib/frr/bgpd(+0x1771a6) [0x559ab430a1a6]
BGP: /usr/lib/frr/bgpd(+0x177f06) [0x559ab430af06]
BGP: /usr/lib/frr/bgpd(+0x178c8b) [0x559ab430bc8b]
BGP: /usr/lib/frr/bgpd(+0x179e7e) [0x559ab430ce7e]
BGP: /lib/libfrr.so.0(+0x9417e) [0x7f4356aea17e]
BGP: /lib/libfrr.so.0(cmd_execute_command+0x111) [0x7f4356aea321]
BGP: /lib/libfrr.so.0(cmd_execute+0xd0) [0x7f4356aea4c0]
BGP: /lib/libfrr.so.0(+0x10d5de) [0x7f4356b635de]
BGP: /lib/libfrr.so.0(+0x10d81d) [0x7f4356b6381d]
BGP: /lib/libfrr.so.0(+0x110b03) [0x7f4356b66b03]
BGP: /lib/libfrr.so.0(event_call+0x81) [0x7f4356b5df91]
BGP: /lib/libfrr.so.0(frr_run+0xe8) [0x7f4356b11b58]
BGP: /usr/lib/frr/bgpd(main+0x385) [0x559ab4281d55]
BGP: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f43566c9083]
BGP: /usr/lib/frr/bgpd(_start+0x2e) [0x559ab428437e]
BGP: in thread vtysh_read scheduled from lib/vty.c:2833 vty_event()

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #13298 from opensourcerouting/dead-import-check
Donald Sharp [Thu, 13 Apr 2023 17:33:47 +0000 (13:33 -0400)]
Merge pull request #13298 from opensourcerouting/dead-import-check

pimd, doc: remove dead import check references

2 years agodoc: fix the print iso macro documentation 13300/head
Louis Scalbert [Thu, 13 Apr 2023 16:27:34 +0000 (18:27 +0200)]
doc: fix the print iso macro documentation

fix the print iso macro documentation

Fixes: 7f9ab3b0bb ("lib: Add ISO System & Network format to printfrr")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agoMerge pull request #13293 from donaldsharp/run_black_on_test
Jafar Al-Gharaibeh [Thu, 13 Apr 2023 15:47:26 +0000 (10:47 -0500)]
Merge pull request #13293 from donaldsharp/run_black_on_test

tests: Run formatting script on test_isis_advertise_high_metrics.py

2 years agopimd, doc: remove dead import check references 13298/head
David Lamparter [Tue, 29 Nov 2022 11:07:39 +0000 (12:07 +0100)]
pimd, doc: remove dead import check references

ZEBRA_IMPORT_CHECK_UPDATE has been gone for more than a year; remove
some leftover dead references to it.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agoospf6d: missing ECMP NHs in certain topologies 13297/head
lynne [Wed, 23 Jun 2021 17:15:17 +0000 (13:15 -0400)]
ospf6d: missing ECMP NHs in certain topologies

When ospf6 is started up and SPF is run depending on which route is
selected as the parent route we could miss adding a NH.   If one
possible parent route has two equal cost paths and the second possible
parent route has only one depending on which one is selected first
determines if we have have one or two NHs.

In the network below when creating a route 2001:db8:3:4::/64 in R2.
When SPF is run there are two possible parent routes R3 and R4.

     2001:db8:1:2  +-----+   2001:db8:2:5
    +--------------+  2  +---------------+
    |          ::2 |     | ::2           |
    |              +-----+               |
    |                                    |
 ::1|                                    |
+-----+                                  |::5
|  1  |2001:db8:1:3+-----+2001:db8:3:5+-----+2001:db8:5:6+-----+
|     +------------+  3  +------------+  5  +------------+  6  |
+-----+ ::1    ::3 |     |::3     ::5 |     |::5      ::6|     |
 ::1|              +-----+            +-----+            +-----+
    |                 |::3
    |                 | 2001:db8:3:4
    |                 |
    |                 |::4
    | 2001:db8:1:4 +-----+
    +--------------+  4  |
               ::4 |     |
                   +-----+

The problem was if we first created the route to 2001:db8:3:4::/64 with R3
as the parent route all is fine.  The code was merging the NH from the parent
route and R3 has 2 NH, one pointing to R1 and one to R5.   But if route
2001:db8:3:4::/64 was first created with parent as R4, it has only one NH
pointing to R1, and then later a new vertex was created pointing to R3 the
code would only copy the nhs from the vertex not from the parent route.   The
vertex always has just one NH.   But the parent route could have more.  So
when we would bringup this setup one time we would see one NH for
2001:db8:3:4::/64 and the next time we would see two NHs.  The code has been
modified so that it behaves the same when the route is first created, or when
a vertex is created, it selects the NHs from the parent route.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>