summaryrefslogtreecommitdiff
path: root/isisd/isisd.c
AgeCommit message (Collapse)Author
2025-04-08isisd: clean up -Wshadow warningsMark Stapp
Clean up various "shadow" warnings. Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-02-26fabricd: add option to treat dummy interfaces as loopback interfacesGabriel Goller
Enable dummy-interfaces to be used as router-id interfaces in openfabric networks. This allows multiple openfabric routers with different router-ids on a single node when using IP unnumbered setup (interfaces without IPs configured). Previously we were limited by having a single loopback interface, allowing only one openfabric router per node. Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2024-10-23isisd: The command "'show isis vrf all summary json" has no output.baozhen-H3C
When input 'show isis vrf all summary', output is as follow: sonic# show isis vrf all summary vrf : default Process Id : 55 System Id : 0000.0000.0006 Symbolic name : RouterA Up time : 4d01h52m ago Number of areas : 1 Area 10: Net: 10.0000.0000.0006.00 IS_name: RouterA TX counters per PDU type: L1 IIH: 365003 L1 LSP: 20468 L1 PSNP: 8 LSP RXMT: 0 RX counters per PDU type: L1 IIH: 361577 L2 IIH: 434 L1 LSP: 10492 L1 CSNP: 114260 Level-1: LSP0 regenerated: 4840 LSPs purged: 0 SPF: minimum interval : 1 IPv4 route computation: last run elapsed : 00:01:02 ago last run duration : 327 usec run count : 12053 However, json display is null. After the commit: sonic# show isis vrf all summary json { "vrfs":[ { "vrf":"default", "process-id":56, "system-id":"0000.0000.0007", "up-time":"20:40:33", "number-areas":1, "areas":[ { "area":"10", "net":"10.0000.0000.0007.00", "tx-pdu-type":{ "l1-iih":52234, "l1-lsp":1053, "l1-csnp":8269, "l1-psnp":1, "lsp-rxmt":0 }, "rx-pdu-type":{ "l1-iih":52245, "l2-iih":26116, "l1-lsp":1388, "l1-csnp":8269 }, "levels":[ { "id":1, "lsp0-regenerated":89, "lsp-purged":0, "spf":"no pending", "minimum-interval":1, "last-run-elapsed":"00:00:05", "last-run-duration-usec":192, "last-run-count":1454 } ] } ] } ] } Signed-off-by: baozhen-H3C <bao.zhen@h3c.com>
2024-08-08isisd: Free up isis master list of instancesDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-24Merge pull request #16232 from zhou-run/202406171755Donald Sharp
isisd: Even after configuring "no hostname dynamic", the topology still displays the hostname.
2024-07-08Merge pull request #16090 from zhou-run/202405271057Russ White
isisd: When operating multiple areas, the system ID behaves abnormally.
2024-06-19isisd: Even after configuring "no hostname dynamic", the topology still ↵zhou-run
displays the hostname. The command "show isis topology" calls print_sys_hostname() to display the system ID or hostname, but it does not check the area->dynhostname flag. Signed-off-by: zhou-run <zhou.run@h3c.com>
2024-05-27isisd: When operating multiple areas, the system ID behaves abnormally.zhou-run
When clearing the net in one of the areas, the system ID is unconditionally cleared, even if the net does not include the current system ID. Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com> isisd: When operating multiple areas, the system ID behaves abnormally. When deleting one of the areas, even if the net under the area includes the current system ID, the system ID still remains. Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com> isisd: fix frrbot styling issues found fix frrbot styling issues found Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com> isisd: fix frrbot styling issues found fix frrbot styling issues found Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com> isisd: Resolve compilation issues. The higher version updates 'struct area_addr' to 'struct iso_address'. Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com> isisd: fix frrbot styling issues found fix frrbot styling issues found Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>
2024-05-23isisd: fix non present level display is show isis database detail jsonLouis Scalbert
When a level is not present in show isis database detail json, {} is displayed. Display nothing for non present level. Fixes: a2cac12a63 ("isisd: Add json to show isis database command.") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-05-23isisd: fix display of router in show isis database <rtr> jsonLouis Scalbert
Display information about a particular router in show isis database in an single value array for compatibility with the display of all routers. Fixes: a2cac12a63 ("isisd: Add json to show isis database command.") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-05-07Merge pull request #15947 from anlancs/isisd/fix-lsp-jsonRuss White
isisd: fix json display for database command
2024-05-07isisd: fix json display for database commandanlan_cs
The current json display lost a lot of LSPs, added them. Fixed the json format for two commands: "show isis database detail json" "show isis database json" Signed-off-by: anlan_cs <anlan_cs@tom.com>
2024-05-05isisd: remove unnecessary check for vrfanlan_cs
The `vrf_name` is always non-NULL in `isisd` code, so remove the unnecesary check to make it clear. Signed-off-by: anlan_cs <anlan_cs@tom.com>
2024-05-03isisd: adjust the format of display commandanlan_cs
Before: ``` anlan# show isis neighbor Area xx: System Id Interface L State Holdtime SNPA 0023.0000.0000 enp1s0 2 Down Expiring2c53.4a30.0820 ``` After: ``` anlan# show isis neighbor Area xx: System Id Interface L State Holdtime SNPA 0023.0000.0000 enp1s0 2 Down Expiring 2c53.4a30.0820 ``` The `-` display format caused by no hello packet in `isis_adj_print_vty()` is same as that of above "Expiring". Signed-off-by: anlan_cs <anlan_cs@tom.com>
2024-01-27isisd: fix overload state locationDavid Lamparter
This belongs in `/var/lib`, not `/var/run`. Also the filename was typo'd (`isid-restart.json`). Change to proper location and fall back to previous in case it's the first restart after an FRR update from a version with the bugged path. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-09-11isisd: Make SRv6 Node MSDs customizableCarmine Scarpitta
Add CLI commands to customize SRv6 Node MSD values. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04isisd: Add CLI command to enable SRv6Carmine Scarpitta
r1# conf r1(config)# router isis <area-tag> r1(config-router)# segment-routing srv6 Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04isisd: Terminate SRv6 when an area is createdCarmine Scarpitta
Call `isis_srv6_area_term()` to cleanup the per-area SRv6 information when an IS-IS area is terminated. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04isisd: Initialize SRv6 when an area is createdCarmine Scarpitta
Call `isis_srv6_area_init()` to initialize the per-area SRv6 DB when an IS-IS area is created. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-07-12isisd: add the 'redistribute table' internal supportPhilippe Guibert
The 'redistribute table' command does not create the internal contexts with the appropriate table identifier. Redistributed prefixes in IS-IS do not care about the table identifier. Add a linked list of redistribution contexts, and map the nb configuration to the linked list. - A new 'table' attribute is added in the 'struct isis_redist' context. - The 'isis_redist_update_zebra_subscriptions()' function is removed and is replaced by direct call to zebra API for turning on/off redirection. - The redistributed routes coming from zebra import the 'tableid' information. - The fabricd redistribute running-config is reworked, and the 'get_redist_settings()' function is removed. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-06-26*: Rearrange vrf_bitmap_X api to reduce memory footprintDonald Sharp
When running all daemons with config for most of them, FRR has sharpd@janelle:~/frr$ vtysh -c "show debug hashtable" | grep "VRF BIT HASH" | wc -l 3570 3570 hashes for bitmaps associated with the vrf. This is a very large number of hashes. Let's do two things: a) Reduce the created size of the actually created hashes to 2 instead of 32. b) Delay generation of the hash *until* a set operation happens. As that no hash directly implies a unset value if/when checked. This reduces the number of hashes to 61 in my setup for normal operation. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-04-27isisd, lib: fix flex-algo database memory leak at area destructionLouis Scalbert
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>
2023-04-20isisd: fix wrong pointer test in area_resign_level()Louis Scalbert
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>
2023-04-18isisd: clarify ifdef fabricdLouis Scalbert
clarify ifdef fabricd Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-04-18isisd: merge algorithm tablesHiroki Shirokura
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>
2023-04-18isisd: calculate flex-algo constraint spfHiroki Shirokura
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>
2023-04-18isisd: add isis flex-algo base interfaceHiroki Shirokura
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>
2023-04-18lib,vtysh,isisd,yang: algo cli/yang/callbacksHiroki Shirokura
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>
2023-04-11Merge pull request #12698 from Orange-OpenSource/isisdRuss White
Isisd/Lib: Add new printfrr format facility for Intermediate System ID
2023-03-28isisd: Add PDU drop counter to "show isis summary"Isabella de Leon
Adding a new drop counters section to "show isis summary". New output: Drop counters per PDU type: P2P IIH: <count> L2 LSP: <count> L2 CSNP: <count> L2 PSNP: <count> ... Before: r1# show isis summary vrf : default Process Id : 972 System Id : 0000.0000.0001 Up time : 00:00:48 ago Number of areas : 1 Area TE: Net: 49.0000.0000.0000.0001.00 TX counters per PDU type: P2P IIH: 36 L2 LSP: 8 L2 CSNP: 12 L2 PSNP: 11 RX counters per PDU type: P2P IIH: 37 L2 LSP: 17 L2 CSNP: 12 L2 PSNP: 6 Advertise high metrics: Disabled ... After: r1# show isis summary vrf : default Process Id : 972 System Id : 0000.0000.0001 Up time : 00:00:19 ago Number of areas : 1 Area TE: Net: 49.0000.0000.0000.0001.00 TX counters per PDU type: P2P IIH: 16 L2 LSP: 2 L2 CSNP: 4 L2 PSNP: 6 LSP RXMT: 0 RX counters per PDU type: P2P IIH: 16 L2 LSP: 5 L2 CSNP: 4 L2 PSNP: 2 Drop counters per PDU type: P2P IIH: 2 Advertise high metrics: Disabled ... Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2023-03-24*: Convert event.h to frrevent.hDonald Sharp
We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert `struct event_master` to `struct event_loop`Donald Sharp
Let's find a better name for it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert struct thread_master to struct event_master and it's ilkDonald Sharp
Convert the `struct thread_master` to `struct event_master` across the code base. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_timer_remain_XXX to event_timer_remain_XXXDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_cancelXXX to event_cancelXXXDonald Sharp
Modify the code base so that thread_cancel becomes event_cancel Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_add_XXX functions to event_add_XXXDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Rename `struct thread` to `struct event`Donald Sharp
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>
2023-03-24*: Rename thread.[ch] to event.[ch]Donald Sharp
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>
2023-03-21isisd: Update to the new printfrr ISO formatOlivier Dugeon
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>
2023-02-28isisd: Add advertise high metrics base functionalityIsabella de Leon
Implement advertise-high-metrics set function - when advertise-high-metrics is configured, iterate through each isis interface and update each metric to its high metric value. When advertise-high-metrics is disabled, revert each interface's metric to its originally configured value. Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2023-02-28isisd: Add advertise-high-metrics CLI/YANG support, modify show outputIsabella de Leon
New config and show functionality: r1# conf r1(config)# router isis 1 r1(config-router)# advertise-high-metrics Advertise high metric value on all interfaces area-password Configure the authentication password for an area ... r1(config-router)# advertise-high-metrics r1(config-router)# end r1# show isis summary ... Area 1: Net: 49.0001.1720.1700.0002.00 TX counters per PDU type: L2 IIH: 1 P2P IIH: 36 LSP RXMT: 0 RX counters per PDU type: Advertise high metrics: Enabled Level-2: ... r1# conf r1(config)# router isis 1 r1(config-router)# no advertise-high-metrics r1(config-router)# end r1# show isis summary ... Area 1: Net: 49.0001.1720.1700.0002.00 TX counters per PDU type: L2 IIH: 1 P2P IIH: 45 LSP RXMT: 0 RX counters per PDU type: Advertise high metrics: Disabled Level-2: ... r1# Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2023-02-28Merge pull request #12819 from isabelladeleon12/isis_load_config_before_lsp_genRuss White
isisd: Delay lsp generation to after config processing is complete
2023-02-21isisd: Fix isisd to generate lsps after config processing is completeIsabella de Leon
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>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-01-31isisd: Add missing enum's to switch statementDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-11-08Merge pull request #11594 from louis-6wind/lfa-netlinkPushpasis Sarkar
isisd: apply fast-reroute as soon an interface or an adjacency falls down
2022-10-25isisd: Make clang-16 compiler happy with isisdDonald Sharp
Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
2022-10-24isisd: apply fast-reroute on an adjacency failureLouis Scalbert
When a adjacency falls down, the primary routes are not deleted on the dataplane until the SPF is recomputed. Even the backup routes are pre-installed on the dataplane, there is no fast-route optimization. Reasons for an adjacency to come down are: - BFD down - Hello timer timeout - User adjacency clear Apply the backup route switchover for fast-reroute as soon an IS-IS adjacency falls down before the first SPF re-computation. Pre-computed backup routes are applied sooner. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-13Merge pull request #11980 from isabelladeleon12/set_overload_startupRuss White
isisd: Add support for set-overload on-startup