summaryrefslogtreecommitdiff
path: root/isisd
AgeCommit message (Collapse)Author
2023-01-27*: fix non-const northbound XPath format stringsDavid Lamparter
Passing a pre-formatted buffer in these places needs a `"%s"` in front so it doesn't get formatted twice. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-01-24Merge pull request #12682 from opensourcerouting/time-csRuss White
*: fix time truncation in many places
2023-01-23isisd: fix time truncation on displayRafael Zalamena
Use a larger storage to keep the `time_t` that is platform agnostic and use the appropriated printing primitive. Found by Coverity Scan (CID 1519793) Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2023-01-04isisd: changed to output the LAN-adjacency-sid in yang formatkanaya516
Signed-off-by: kanaya516 <abcs516tk1@gmail.com>
2023-01-04isisd: changed to output the adjacency-sid in yang formatkanaya516
Signed-off-by: kanaya516 <abcs516tk1@gmail.com>
2022-12-09isisd: Fix sadj memory leakDonald Sharp
In some cases the sadj was directly dropped. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-11-17isisd: fix area NULL pointer in isis_route_updateLouis Scalbert
Fix the case area is NULL. Fixes: acc0029779 ("isisd: fix potential access to NULL pointer in isis_route_update") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.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-11-03Merge pull request #12196 from opensourcerouting/xref-vtyshDonald Sharp
*: rewrite `extract.pl` using `xref` infra
2022-10-26isisd/fabricd: use PROTO_NAME in SR codeDavid Lamparter
The IS-IS SR code was missing a use of `PROTO_NAME`, making fabricd collide with the isisd CLI command. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-10-26build, vtysh: extract vtysh commands from .xrefDavid Lamparter
Rather than running selected source files through the preprocessor and a bunch of perl regex'ing to get the list of all DEFUNs, use the data collected in frr.xref. This not only eliminates issues we've been having with preprocessor failures due to nonexistent header files, but is also much faster. Where extract.pl would take 5s, this now finishes in 0.2s. And since this is a non-parallelizable build step towards the end of the build (dependent on a lot of other things being done already), the speedup is actually noticeable. Also files containing CLI no longer need to be listed in `vtysh_scan` since the .xref data covers everything. `#ifndef VTYSH_EXTRACT_PL` checks are equally obsolete. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-10-25isisd: Make clang-16 compiler happy with isisdDonald Sharp
Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
2022-10-24isisd: fix potential access to NULL pointer in isis_route_updateLouis Scalbert
Fix potential access to NULL pointer in isis_route_update even if it is not related with the fast-reroute implementation. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24isisd: fix SPF scheduling on IPv6 only topologyLouis Scalbert
If ISIS is running on an IPv6 only topology, the command "spf interval" has no effect. Only the IPv4 SPF tree timers are taken into account. Base the next SPF scheduling on the last running SPF tree. Fixes: be985ba059 ("isisd: make use of advanced concepts like arrays and loops") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24isisd: fix metric calculation of classic lfa backup prefixesLouis Scalbert
The isis-lfa-topo1 topotest shows backup routes with lower metrics than the primary ones. > rt1# show isis route > Area 1: > IS-IS L1 IPv6 routing table: > > Prefix Metric Interface Nexthop Label(s) > ------------------------------------------------------------------------------ > 2001:db8:1000::1/128 0 - - - > 2001:db8:1000::2/128 20 eth-rt2 fe80::d091:eeff:fe09:31cd - > 2001:db8:1000::3/128 20 eth-rt3 fe80::946b:d4ff:fe5b:414b - > 2001:db8:1000::4/128 20 eth-rt4 fe80::5ced:29ff:feed:59c4 - > (...) > > rt1# show isis route backup > Area 1: > IS-IS L1 IPv6 routing table: > > Prefix Metric Interface Nexthop Label(s) > ------------------------------------------------------------------------------ > 2001:db8:1000::2/128 15 eth-rt3 fe80::946b:d4ff:fe5b:414b - > eth-rt5 fe80::847d:feff:fe74:bdde - > eth-rt6 fe80::ac8c:dff:feac:8a8d - > 2001:db8:1000::3/128 15 eth-rt2 fe80::d091:eeff:fe09:31cd - > eth-rt5 fe80::847d:feff:fe74:bdde - > 2001:db8:1000::4/128 45 eth-rt5 fe80::847d:feff:fe74:bdde - > (...) Backup routes metrics are incorrect because they only take into account the path metric but not the prefix metric. Add the prefix metric to the path metric on backup routes. After the patch with a prefix metric of 10: > rt1# show isis route backup > Area 1: > IS-IS L1 IPv6 routing table: > > Area 1: > IS-IS L1 IPv6 routing table: > > Prefix Metric Interface Nexthop Label(s) > ------------------------------------------------------------------------------ > 2001:db8:1000::2/128 25 eth-rt3 fe80::8c6f:8aff:fe10:ad0d - > eth-rt5 fe80::b08e:5cff:fe90:62dd - > eth-rt6 fe80::4810:47ff:fe81:2b9a - > 2001:db8:1000::3/128 25 eth-rt2 fe80::e855:12ff:fe31:5765 - > eth-rt5 fe80::b08e:5cff:fe90:62dd - > 2001:db8:1000::4/128 55 eth-rt5 fe80::b08e:5cff:fe90:62dd - Fixes: e886416f81 ("isisd: add support for classic LFA (RFC 5286)") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24isisd: fix recreating the LS TED after re-enabling MPLS TELouis Scalbert
When disabling and re-enabling the "mpls-te on" command, the LS TED database is deleted but not re-created. Cleanup the LS TED database instead of deleting it when disabling "mpls-te". Fixes: 1fa6385040.. ("isisd: Correct Valgrind errors") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24isisd: fix sending remote interface ip address after enabling MPLS TELouis Scalbert
If MPLS TE is enabled, the router encodes the local and remote interface IP address in the "Extended Reachability" TLV. > east-vm(config)# do show isis database detail east-vm.00-00 > Extended Reachability: 0007.e901.3333.00 (Metric: 10) > Local Interface IP Address(es): 10.126.0.2 > Remote Interface IP Address(es): 10.126.0.3 > Maximum Bandwidth: 1.76258e+08 (Bytes/sec) The remote interface is added when the circuit adjacency comes up after setting MPLS TE. However, if MPLS TE is enabled after, the remote address is not added. It happens after disabling and re-enabling the MPLS TE. > east-vm(config)# router isis 1 > east-vm(config-router)# no mpls on > east-vm(config-router)# mpls on > east-vm(config)# do show isis database detail east-vm.00-00 > Extended Reachability: 0007.e901.3333.00 (Metric: 10) > Local Interface IP Address(es): 10.126.0.2 > Maximum Bandwidth: 1.76258e+08 (Bytes/sec) Update the remote IPv4 and IPv6 of all adjacencies after enabling MPLS TE. Fixes: 1b3f47d04c ("isisd: Update TLVs processing for TE, RI & SR") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24isisd: avoid fast-reroute from running twice on a down interface eventLouis Scalbert
isis_ifp_down() may in some circumstances be called twice on a down interface event. Avoid applying fast-reroute on an already down interface. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24isisd: avoid fast-reroute on down adjacency when the interface is downLouis Scalbert
When an IS-IS interface is coming down, fast-reroute may be triggered twice: a first time after the detection of the interface down event and a second time after the detection of the adjacency down (because of the expiration of the ISIS Hello or BFD timers). Avoid a BFD down event from running fast-reroute another time if the interface was already detected down. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24isisd: apply fast-reroute when an interface falls downLouis Scalbert
Backup routes are sent to zebra by routing daemons such as isisd so that the dataplane can pre-install them with a lower priority. When an interface comes down, the associated primary routes are discarded by the dataplane and the backup ones take over. However, some dataplanes (e.g. Netlink ones) do not pre-install the backup routes. Associated prefixes have no next-hop until SPF is recomputed. Apply fast-reroute as soon as an interface falls down by sending route UPDATEs to zebra. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24isisd: allow nexthop lookup on interface onlyLouis Scalbert
Allow the nexthoplookup function to return the first nexthop found on ifindex interface if the IP is unspecified. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24isisd: remove previous labels before fast-rerouteLouis Scalbert
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.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
2022-10-12isisd: Add JSON object functions to save overload status between restarts.Isabella de Leon
Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2022-10-12isisd: Add expected behavior with set-overload-bitIsabella de Leon
Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2022-10-07*: Create and use infrastructure to show debugs in libDonald Sharp
There are lib debugs being set but never show up in `show debug` commands because there was no way to show that they were being used. Add a bit of infrastructure to allow this and then use it for `debug route-map` Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-10-04fabricd: Turn off excessive logging when peering will not come upDonald Sharp
When fabricd is configured to use an interface and there will be no peers out that interface, the log file is filling up with: Oct 04 10:50:03 host2 fabricd[1444769]: [HHXDJ-1DA93] ISIS-Adj (1): Threeway state change Initializing to Up Oct 04 10:50:03 host2 fabricd[1444769]: [R18GA-MS9R7] OpenFabric: Started initial synchronization with 1111.1111.1111 on enp1s0f1np1 Oct 04 10:50:06 host2 fabricd[1444769]: [HHXDJ-1DA93] ISIS-Adj (1): Threeway state change Up to Initializing Oct 04 10:50:07 host2 fabricd[1444769]: [NT6J7-1RYRF] OpenFabric: Initial synchronization on enp1s0f1np1 timed out! Oct 04 10:50:07 host2 fabricd[1444769]: [R18GA-MS9R7] OpenFabric: Started initial synchronization with 3333.3333.3333 on enp1s0f0np0 Oct 04 10:50:08 host2 fabricd[1444769]: [HHXDJ-1DA93] ISIS-Adj (1): Threeway state change Up to Initializing Oct 04 10:50:11 host2 fabricd[1444769]: [NT6J7-1RYRF] OpenFabric: Initial synchronization on enp1s0f0np0 timed out! Oct 04 10:50:11 host2 fabricd[1444769]: [HHXDJ-1DA93] ISIS-Adj (1): Threeway state change Initializing to Up Oct 04 10:50:11 host2 fabricd[1444769]: [R18GA-MS9R7] OpenFabric: Started initial synchronization with 1111.1111.1111 on enp1s0f1np1 Oct 04 10:50:14 host2 fabricd[1444769]: [HHXDJ-1DA93] ISIS-Adj (1): Threeway state change Up to Initializing Oct 04 10:50:15 host2 fabricd[1444769]: [NT6J7-1RYRF] OpenFabric: Initial synchronization on enp1s0f1np1 timed out! Oct 04 10:50:16 host2 fabricd[1444769]: [R18GA-MS9R7] OpenFabric: Started initial synchronization with 1111.1111.1111 on enp1s0f1np1 Oct 04 10:50:18 host2 fabricd[1444769]: [HHXDJ-1DA93] ISIS-Adj (1): Threeway state change Initializing to Up The `Threeway state change..` message is guarded by a debug, but the other 2 are not. Let's guard those with debugs since the log will be filled up rather quickly with any sort of aggressive timers. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-09-30isisd: Add overload timer and overload on startup functionalityIsabella de Leon
Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2022-09-21isisd: Add set-overload on-startup CLI/YANG supportIsabella de Leon
Before: r1# conf r1(config)# router isis <area-tag> r1(config-router)# set-overload-bit <cr> r1(config-router)# end After: r1# conf r1(config)# router isis <area-tag> r1(config-router)# set-overload-bit <cr> on-startup Set overload bit on startup r1(config-router)# set-overload-bit on-startup (0-86400) Set overload time in seconds r1(config-router)# set-overload-bit on-startup 300 r1(config-router)# end Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2022-09-20isisd: Fix memory leak on shutdown with prefix listsDonald Sharp
==2623619== ==2623619== 6 bytes in 1 blocks are definitely lost in loss record 3 of 75 ==2623619== at 0x483877F: malloc (vg_replace_malloc.c:307) ==2623619== by 0x4B55E4A: strdup (strdup.c:42) ==2623619== by 0x493C992: qstrdup (memory.c:128) ==2623619== by 0x1A9212: isis_instance_fast_reroute_level_1_remote_lfa_prefix_list_modify (isis_nb_config.c:1599) ==2623619== by 0x494837C: nb_callback_modify (northbound.c:1083) ==2623619== by 0x4948C6E: nb_callback_configuration (northbound.c:1352) ==2623619== by 0x494919D: nb_transaction_process (northbound.c:1473) ==2623619== by 0x4947DA9: nb_candidate_commit_apply (northbound.c:906) ==2623619== by 0x4947EBA: nb_candidate_commit (northbound.c:938) ==2623619== by 0x494EB9E: nb_cli_classic_commit (northbound_cli.c:64) ==2623619== by 0x494F3DC: nb_cli_apply_changes_internal (northbound_cli.c:250) ==2623619== by 0x494F4E2: nb_cli_apply_changes (northbound_cli.c:268) ==2623619== by 0x1BEF0F: isis_frr_remote_lfa_plist_magic (isis_cli.c:1899) ==2623619== by 0x1B7636: isis_frr_remote_lfa_plist (isis_cli_clippy.c:3406) ==2623619== by 0x48EBA75: cmd_execute_command_real (command.c:997) ==2623619== by 0x48EBD4E: cmd_execute_command_strict (command.c:1108) ==2623619== by 0x48EC1E6: command_config_read_one_line (command.c:1268) ==2623619== by 0x48EC35B: config_from_file (command.c:1313) ==2623619== by 0x4999CC1: vty_read_file (vty.c:2347) ==2623619== by 0x499A4AF: vty_read_config (vty.c:2567) ==2623619== by 0x4924B12: frr_config_read_in (libfrr.c:984) ==2623619== by 0x498F5E3: thread_call (thread.c:2008) ==2623619== by 0x49253DA: frr_run (libfrr.c:1198) ==2623619== by 0x14FC53: main (isis_main.c:273) Fix this memory leak Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-09-02isisd: Correct Valgrind errorsOlivier Dugeon
Runing most of isisd tests with --valgrind-memleaks give many memory errors. This is due to the way isisd is stopped: performing a "no router isis XXX" through CLI solves most of them. Indeed, isis_finish() doesn't call isis_area_destroy() leaving many allocated memory unfreed. This patch adds call to appropriate delete function or XFREE() when necessary to properly free all alocated memory before terminating isisd. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2022-08-29isisd: changes for code maintainabilitysri-mohan1
these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2022-08-29isisd: changes for code maintainabilitysri-mohan1
these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2022-07-28isisd: Prevent leak of global_ipv6_addrsDonald Sharp
adj->global_ipv6_addrs was not being freed on deletion of the adjacency. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-22isisd: Ensure rcap is freed in error caseDonald Sharp
unpack_tlv_router_cap allocates memory that in the error case is not being freed. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-21isisd: Convert thread_cancel to THREAD_OFFDonald Sharp
Just convert all uses of thread_cancel to THREAD_OFF Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-20isisd: fix prefix-sid last-hop-behaviorLouis Scalbert
The php value is defined in yang but not properly set. Fixes: 8f6c893629 ("isisd: add segment-routing CLI commands") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-07-10Revert "isisd: apply fast-reroute on an adjacency failure"Donatas Abraitis
This reverts commit 71252973234e70ffa3cb5eec43d4efc1be3d3331.
2022-07-10Revert "isisd: remove previous labels before fast-reroute"Donatas Abraitis
This reverts commit a254fa54e3d5c31befb40164fc70deab3cf639ad.
2022-07-10Revert "isisd: allow nexthop lookup on interface only"Donatas Abraitis
This reverts commit a11742dc53e31d1379cb4f7b9b7b750614e30928.
2022-07-10Revert "isisd: apply fast-reroute when an interface falls down"Donatas Abraitis
This reverts commit 62e458278b3d261f492ffeac7ed70b32272a43dd.
2022-07-10Revert "isisd: avoid fast-reroute on down adjacency when the interface is down"Donatas Abraitis
This reverts commit 08e4960ab48c1c9e4227e40b286d5cbc4ac581f0.
2022-07-10Revert "isisd: avoid fast-reroute from running twice on a down interface event"Donatas Abraitis
This reverts commit d526476184999275c318b13f92ae6b38a0250052.
2022-07-10Revert "isisd: fix metric calculation of classic lfa backup prefixes"Donatas Abraitis
This reverts commit e45958e9cfccd6dfc108a7ef5cb73775e8ef2e68.
2022-07-10Revert "isisd: fix SPF scheduling on IPv6 only topology"Donatas Abraitis
This reverts commit d95cd33545006004424736d20a0226b5cd9fb47a.
2022-07-08Merge pull request #10962 from louis-6wind/lfa-netlinkRuss White
isisd: apply fast-reroute as soon an interface or an adjacency falls down
2022-06-30isisd: fix infinite loop when parsing LSPsLouis Scalbert
Fixing the crash: > #0 0x0000560aa80f8e30 in lspdb_const_find (h=<error reading variable: Cannot access memory at address 0x7fff5e95efe8>, item=<error reading variable: Cannot access memory at address 0x7fff5e95efe0>) at ./isisd/isis_lsp.h:64 > #1 0x0000560aa80f8e9d in lspdb_find (h=0x560aaa1ed3b8, item=0x7fff5e95f050) at ./isisd/isis_lsp.h:64 > #2 0x0000560aa80f92f9 in lsp_search (head=0x560aaa1ed3b8, id=0x7fff5e95f200 "") at isisd/isis_lsp.c:100 > #3 0x0000560aa8113d69 in spf_adj_list_parse_tlv (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, id=0x560aad331a78 "", desig_is_id=0x0, pseudo_metric=0, metric=3, oldmetric=false, subtlvs=0x0) at isisd/isis_spf.c:1330 > #4 0x0000560aa811419d in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1f4e50, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1429 > #5 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1ff8e0, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442 > #6 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1f4e50, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442 > (...) > #65507 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1ff8e0, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442 > #65508 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1f4e50, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442 > #65509 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1ff8e0, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442 > #65510 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1f4e50, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442 > #65511 0x0000560aa8114313 in isis_spf_build_adj_list (spftree=0x560aaa1f09d0, lsp=0x560aaa1f4e50) at isisd/isis_spf.c:1455 > #65512 0x0000560aa8114f09 in isis_run_spf (spftree=0x560aaa1f09d0) at isisd/isis_spf.c:1775 > #65513 0x0000560aa8115057 in isis_run_spf_with_protection (area=0x560aaa1ed3b0, spftree=0x560aaa1f09d0) at isisd/isis_spf.c:1801 > #65514 0x0000560aa8115311 in isis_run_spf_cb (thread=0x7fff5f15e5a0) at isisd/isis_spf.c:1859 > #65515 0x00007f90bac66dcc in thread_call (thread=0x7fff5f15e5a0) at lib/thread.c:2002 > #65516 0x00007f90bac013ee in frr_run (master=0x560aa9f5cb40) at lib/libfrr.c:1196 > #65517 0x0000560aa80e7da2 in main (argc=2, argv=0x7fff5f15e7b8, envp=0x7fff5f15e7d0) at isisd/isis_main.c:273 The fix is similar to the crash fix included in d9884a758c ("isisd: Prepare IS-IS for Link State support"). The fix was: > diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c > index 94353a5bc8..92d329f035 100644 > --- a/isisd/isis_lsp.c > +++ b/isisd/isis_lsp.c > @@ -2166,7 +2178,7 @@ int isis_lsp_iterate_ip_reach(struct isis_lsp *lsp, int family, uint16_t mtid, > if (lsp->hdr.seqno == 0 || lsp->hdr.rem_lifetime == 0) > return LSP_ITER_CONTINUE; > > - /* Parse main LSP. */ > + /* Parse LSP */ > if (lsp->tlvs) { > if (!fabricd && !pseudo_lsp && family == AF_INET > && mtid == ISIS_MT_IPV4_UNICAST) { > @@ -2236,13 +2248,17 @@ int isis_lsp_iterate_ip_reach(struct isis_lsp *lsp, int family, uint16_t mtid, > } > } > > - /* Parse LSP fragments. */ > - for (ALL_LIST_ELEMENTS_RO(lsp->lspu.frags, node, frag)) { > - if (!frag->tlvs) > - continue; > + /* Parse LSP fragments if it is not a fragment itself */ > + if (!LSP_FRAGMENT(lsp->hdr.lsp_id)) > + for (ALL_LIST_ELEMENTS_RO(lsp->lspu.frags, node, frag)) { > + if (!frag->tlvs) > + continue; > > - isis_lsp_iterate_ip_reach(frag, family, mtid, cb, arg); > - } > + if (isis_lsp_iterate_ip_reach(frag, family, mtid, cb, > + arg) > + == LSP_ITER_STOP) > + return LSP_ITER_STOP; > + } > > return LSP_ITER_CONTINUE; > } Fixes: 7b36d36e0e ("isisd: make the SPF code more modular") Fixes: 5e56a50559 ("isisd: fix infinite loop when parsing LSPs") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-06-30Revert "isisd: fix infinite loop when parsing LSPs"Louis Scalbert
This reverts commit 5e56a50559fd4a85f1912464e6e13d13969aa238.
2022-06-28Merge pull request #11434 from donaldsharp/more_test_fixupsIgor Ryzhov
Crash fix and test fix and some cleanup