summaryrefslogtreecommitdiffstats
path: root/isisd/isis_pdu.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* isisd: When the ISIS types of the routers do not match on a P2P link, the ↵zhou-run2024-11-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | neighbor status remains UP Test Scenario: RouterA and RouterB are in the same routing domain and have configured a P2P link. RouterA is configured with "is-type level-1" while RouterB is configured with "is-type level-1-2". They establish a level-1 UP neighborship. In this scenario, we expect that when RouterB's configuration is switched to "is-type level-2-only", the neighborship status on both RouterA and RouterB would be non-UP. However, RouterB still shows the neighbor as UP. Upon receiving a P2P Hello packet, the function "process_p2p_hello" is invoked. According to the ISO/IEC 10589 protocol specification, section 8.2.5.2 a) and tables 5 and 7, if the "iih->circ_type" of the neighbor's hello packet does not match one's own "circuit->is_type," we may choose to take no action. When establishing a neighborship for the first time, the neighbor's status can remain in the "Initializing" state. However, if the neighborship has already been established and one's own "circuit->is_type" changes, the neighbor's UP status cannot be reset. Therefore, when processing P2P Hello packets, we should be cognizant of changes in our own link adjacency type. Topotest has identified a core issue during testing. (gdb) bt "#0 0xb7efe579 in __kernel_vsyscall () \#1 0xb79f62f7 in ?? () \#2 0xbf981dd0 in ?? () \#3 <signal handler called> \#4 0xb79f7722 in ?? () \#5 0xb7ed8634 in _DYNAMIC () from /home/z15467/isis_core/usr/lib/i386-linux-gnu/frr/libfrr.so.0.0.0 \#6 0x0001003c in ?? () \#7 0x00010000 in ?? () \#8 0xb7df3322 in _frr_mtx_lock (mutex=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/frr_pthread.h:255 \#9 event_timer_remain_msec (thread=0x10000) at ../lib/event.c:734 \#10 event_timer_remain_msec (thread=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/event.c:727 \#11 0x004fb4aa in _send_hello_sched (circuit=<optimized out>, threadp=0x2189de0, level=1, delay=<optimized out>) at ../isisd/isis_pdu.c:2116 \#12 0x004e8dbc in isis_circuit_up (circuit=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../isisd/isis_circuit.c:734 \#13 0x004ea8f7 in isis_csm_state_change (event=<optimized out>, circuit=<optimized out>, arg=<optimized out>) at ../isisd/isis_csm.c:98 \#14 0x004ea23f in isis_circuit_circ_type_set (circuit=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, circ_type=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../isisd/isis_circuit.c:1578 \#15 0x0053aefa in lib_interface_isis_network_type_modify (args=<optimized out>) at ../isisd/isis_nb_config.c:4190 \#16 0xb7dbcc8d in nb_callback_modify (errmsg_len=8192, errmsg=0xbf982afc "", resource=0x2186220, dnode=<optimized out>, event=NB_EV_APPLY, nb_node=0x1fafe70, context=<optimized out>) at ../lib/northbound.c:1550 \#17 nb_callback_configuration (context=<optimized out>, event=NB_EV_APPLY, change=<optimized out>, errmsg=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, errmsg_len=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/northbound.c:1900 \#18 0xb7dbd646 in nb_transaction_process (errmsg_len=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, errmsg=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, transaction=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, event=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/northbound.c:2028 \#19 nb_candidate_commit_apply (transaction=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, save_transaction=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, transaction_id=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, errmsg=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, errmsg_len=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/northbound.c:1368 \#20 0xb7dbdd68 in nb_candidate_commit (context=..., candidate=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, save_transaction=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, comment=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, transaction_id=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, errmsg=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, errmsg_len=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/northbound.c:1401 \#21 0xb7dc0cff in nb_cli_classic_commit (vty=vty@entry=0x21d6940) at ../lib/northbound_cli.c:57 \#22 0xb7dc0f46 in nb_cli_apply_changes_internal (vty=vty@entry=0x21d6940, xpath_base=xpath_base@entry=0xbf986b7c "/frr-interface:lib/interface[name='r5-eth0']", clear_pending=clear_pending@entry=false) at ../lib/northbound_cli.c:184 \#23 0xb7dc130b in nb_cli_apply_changes (vty=<optimized out>, xpath_base_fmt=<optimized out>) at ../lib/northbound_cli.c:240 \#24 0x00542c1d in isis_network_magic (self=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, argc=<optimized out>, argv=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, no=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, vty=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../isisd/isis_cli.c:3101 \#25 isis_network (self=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, vty=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, argc=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, argv=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ./isisd/isis_cli_clippy.c:5499 \#26 0xb7d6d8f1 in cmd_execute_command_real (vline=vline@entry=0x219afa0, vty=vty@entry=0x21d6940, cmd=cmd@entry=0x0, up_level=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/command.c:1003 \#27 0xb7d6d9e0 in cmd_execute_command (vline=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, vty=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, cmd=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, vtysh=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/command.c:1061 \#28 0xb7d6dc60 in cmd_execute (vty=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, cmd=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, matched=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, vtysh=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/command.c:1228 \#29 0xb7dfb58a in vty_command (vty=vty@entry=0x21d6940, buf=0x21e0ff0 ' ' <repeats 12 times>, "isis network point-to-point") at ../lib/vty.c:625 \#30 0xb7dfc560 in vty_execute (vty=vty@entry=0x21d6940) at ../lib/vty.c:1388 \#31 0xb7dfdc8d in vtysh_read (thread=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/vty.c:2400 \#32 0xb7df4d47 in event_call (thread=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/event.c:2019 \#33 0xb7d9a831 in frr_run (master=<optimized out>) at ../lib/libfrr.c:1232 \#34 0x004e4758 in main (argc=7, argv=0xbf989a24, envp=0xbf989a44) at ../isisd/isis_main.c:354 (gdb) f 9 \#9 event_timer_remain_msec (thread=0x10000) at ../lib/event.c:734 734 ../lib/event.c: No such file or directory. (gdb) p pthread No symbol "pthread" in current context. (gdb) p thread $1 = (struct event *) 0x10000 When LAN links and P2P links share the` circuit->u` of a neighbor, if one link is no longer in use and the union is not cleared, the other link is unable to pass the non-empty check, resulting in accessing an invalid pointer. Unfortunately, for non-DIS devices in LAN links, `circuit->u.bc.run_dr_elect[x]` is essentially always 1, but in `isis_circuit_down()`,` circuit->u.bc.run_dr_elect[x] `will not be cleared because `circuit->u.bc.is_dr[x]` is always 0. Consequently, when switching to a P2P link, `isis_circuit_circ_type_set()` does not reset the link in a non-C_STATE_UP state, leading to subsequent accesses of `circuit->u.p2p.t_send_p2p_hello` resulting in a non-empty yet invalid address. I believe that in `isis_circuit_down()`, the LAN link should unconditionally clear `circuit->u.bc.run_dr_elect[x]`. Signed-off-by: zhou-run <zhou.run@h3c.com>
* isisd: fix memory handling in isis_adj_process_threeway()Mark Stapp2024-08-091-8/+8
| | | | | | | | | The adj_process_threeway() api may call the adj_state_change() api, which may delete the adj struct being examined. Change the signature so that callers pass a ptr-to-ptr so that they will see that deletion. Signed-off-by: Mark Stapp <mjs@cisco.com>
* isisd: The hold time of hello packets on a P2P link does not match the ↵zhou-run2024-04-091-1/+1
| | | | | | | | sending interval. The hold time filled in the hello packets of a P2P link is calculated based on the level 1 configuration, while the hello timer is based on the level 2 configuration. If the hello interval times in level 1 and level 2 configurations are inconsistent, it may lead to neighbor establishment failure. Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>
* isisd:change ngh lvl when int circuit type settedSososhas2023-10-231-67/+110
| | | | | | | | | | | | | | I added a new variable to calculate the required level of neighborhood, as well as checking if the interfaces are in the same area, in accordance with cisco Signed-off-by: Sososhas <1248756005hfh@gmail.com> isis:fixed adj level in topotests fixed adj level on rt6 Signed-off-by: Sososhas <1248756005hfh@gmail.com>
* Merge pull request #13163 from isabelladeleon12/isis_log_dropsRuss White2023-04-111-16/+48
|\ | | | | isisd: Add support for log-pdu-drops
| * isisd: Add log-pdu-drops log functionalityIsabella de Leon2023-04-041-16/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If log-pdu-drops is configured, create an INFO log that displays the PDU type and drop counts when a PDU drop is detected. Example logs: 2023/03/30 23:54:59.749 ISIS: [VAS9N-1JNNR] PDU drop detected of type: P2P IIH. 1 Total Drops; 0 L1 IIH drops; 0 L2 IIH drops; 1 P2P IIH drops; 0 L1 LSP drops; 0 L2 LSP drops; 0 FS LSP drops; 0 L1 CSNP drops; 0 L2 CSNP drops; 0 L1 PSNP drops; 0 L2 PSNP drops. 2023/03/30 23:54:59.848 ISIS: [VAS9N-1JNNR] PDU drop detected of type: P2P IIH. 2 Total Drops; 0 L1 IIH drops; 0 L2 IIH drops; 2 P2P IIH drops; 0 L1 LSP drops; 0 L2 LSP drops; 0 FS LSP drops; 0 L1 CSNP drops; 0 L2 CSNP drops; 0 L1 PSNP drops; 0 L2 PSNP drops. Code changes: Add a new PDU counter function that increments the drop counter and runs the logging functionality if log-pdu-drops is configured. Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
* | Merge pull request #12698 from Orange-OpenSource/isisdRuss White2023-04-111-62/+59
|\ \ | |/ |/| Isisd/Lib: Add new printfrr format facility for Intermediate System ID
| * isisd: Update to the new printfrr ISO formatOlivier Dugeon2023-03-211-62/+59
| | | | | | | | | | | | | | | | | | 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>
* | isisd: Add PDU drop counter to "show isis summary"Isabella de Leon2023-03-291-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | *: Convert event.h to frrevent.hDonald Sharp2023-03-241-1/+1
| | | | | | | | | | | | | | We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp2023-03-241-9/+9
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Convert thread_timer_remain_XXX to event_timer_remain_XXXDonald Sharp2023-03-241-1/+1
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Convert thread_add_XXX functions to event_add_XXXDonald Sharp2023-03-241-22/+21
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Rename `struct thread` to `struct event`Donald Sharp2023-03-241-8/+7
| | | | | | | | | | | | | | | | | | Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Rename thread.[ch] to event.[ch]Donald Sharp2023-03-241-1/+1
|/ | | | | | | | | | | This is a first in a series of commits, whose goal is to rename the thread system in FRR to an event system. There is a continual problem where people are confusing `struct thread` with a true pthread. In reality, our entire thread.c is an event system. In this commit rename the thread.[ch] files to event.[ch]. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* isisd,tests,doc: Rename hello padding sometimes to hello padding ↵Diogo Oliveira2023-02-281-1/+2
| | | | | | during-adjacency-formation Signed-off-by: Diogo Oliveira <14191454+dorDiogo@users.noreply.github.com>
* isisd: Add support for isis hello padding sometimesDiogo Oliveira2023-02-281-1/+6
| | | | | | New configuration to pad ISIS hello packets during adjacency formation only. Signed-off-by: Diogo Oliveira <14191454+dorDiogo@users.noreply.github.com>
* *: auto-convert to SPDX License IDsDavid Lamparter2023-02-091-14/+1
| | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* isisd: Convert thread_cancel to THREAD_OFFDonald Sharp2022-07-211-3/+3
| | | | | | Just convert all uses of thread_cancel to THREAD_OFF Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* isisd: Fix crash with xfrm interface typeDonald Sharp2022-06-231-4/+4
| | | | | | | | | | | | | | When creating a xfrm interface FRR is crashing when configured with isis. This is because the weird pattern of not allocating list's until needed and then allowing the crash when we have a usage pattern that was not expected. Just always allocate the different lists that a circuit needs. (gdb) bt (gdb) Fixes #11432 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Fix spelling of accomodateDonald Sharp2022-04-191-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* Merge pull request #10701 from rampxxxx/feat_isis_json_show_cmdsRuss White2022-03-081-2/+2
|\ | | | | Feat isis json show cmds
| * isisd: Add json to show isis database command.Javier Garcia2022-03-021-2/+2
| | | | | | | | Signed-off-by: Javier Garcia <javier.martin.garcia@ibm.com>
* | *: Change thread->func to return void instead of intDonald Sharp2022-02-241-25/+17
|/ | | | | | | The int return value is never used. Modify the code base to just return a void instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* isisd: Add support for RFC6119 (IPv6 TE in IS-IS)Olivier Dugeon2021-11-301-0/+5
| | | | | | | | | | | | | | - Add advertisement of Global IPv6 address in IIH pdu - Add new CLI to set IPv6 Router ID - Add advertisement of IPv6 Router ID - Correctly advertise IPv6 local and neighbor addresses in Extended IS and MT Reachability TLVs - Correct output of Neighbor IPv6 address in 'show isis database detail' - Manage IPv6 addresses advertisement and corresponiding Adjacency SID when IS-IS is not using Multi-Topology by introducing a new ISIS_MT_DISABLE value for mtid (== 4096 i.e. first reserved flag set to 1) Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* isisd: support for snmplynne2021-03-021-54/+126
| | | | | | | Add support for read only mib objects from RFC4444. Signed-off-by: Lynne Morrison <lynne@voltanet.io> Signed-off-by: Karen Schoener <karen@voltanet.io>
* *: remove tabs & newlines from log messagesDavid Lamparter2021-02-141-1/+1
| | | | | | | Neither tabs nor newlines are acceptable in syslog messages. They also break line-based parsing of file logs. Signed-off-by: David Lamparter <equinox@diac24.net>
* isisd: Fix Attach-bit processinglynne2021-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | The purpose of the Attach-bit is to accomplish inter-area routing. In other venders, the Attached-bit is automatically set when a router is configured as a L1|L2 router and has two adjacencies. When a L1 router receives a LSP with the Attached-bit set it is supposed to create a default route pointing toward the neighbor to provide a default path out of the L1 area. ISIS implementation has been fixed to support the above definition: Setting the Attach-bit is now the default behavior and we allow the user to turn it off. We will only set the Default Attach-bit when creating a L1 LSP, if we are a L1|L2 router and have a L2 adjacency up. When a L1 router receives a LSP with the Attach-bit set, we will create a default route pointing to the L1|L2 router as the nexthop. The default route will be removed if the LSP is received with the Attach-bit cleared. Signed-off-by: Lynne Morrison <lynne@voltanet.io>
* *: unify thread/event cancel macrosMark Stapp2020-10-231-2/+2
| | | | | | | | | Replace all lib/thread cancel macros, use thread_cancel() everywhere. Only the THREAD_OFF macro and thread_cancel() api are supported. Also adjust thread_cancel_async() to NULL caller's pointer (if present). Signed-off-by: Mark Stapp <mjs@voltanet.io>
* * : update signature of thread_cancel apiMark Stapp2020-10-231-1/+1
| | | | | | | | Change thread_cancel to take a ** to an event, NULL-check before dereferencing, and NULL the caller's pointer. Update many callers to use the new signature. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* isisd: circuit->area->isis to circuit->isisDonald Sharp2020-10-091-18/+13
| | | | | | | | The code in isisd uses `circuit->area->isis` all the time but we know that circuit now has a valid `circuit->isis` pointer so let's use that and cleanup the long dereference. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* isisd : Transformational changes to support different VRFs.Kaushik2020-08-141-15/+28
| | | | | | | | | 1. Created a structure "isis master". 2. All the changes are related to handle ISIS with different vrf. 3. A new variable added in structure "isis" to store the vrf name. 4. The display commands for isis is changed to support different VRFs. Signed-off-by: Kaushik <kaushik@niralnetworks.com>
* isisd: fix OpenBSD pedantic format warningsDavid Lamparter2020-07-141-1/+1
| | | | | | | | constants are int-typed, so adding something to an uint8_t yields an int. Nevermind the fact that varargs calling conventions require upcasting everything smaller than an int to an int anyways... Signed-off-by: David Lamparter <equinox@diac24.net>
* *: remove PRI[udx](8|16|32)David Lamparter2020-07-141-34/+21
| | | | | | | | | | | These are completely pointless and break coccinelle string replacements. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --pri8-16-32 `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
* *: un-split strings across linesDavid Lamparter2020-07-141-15/+7
| | | | | | | | | | | | | | | | | Remove mid-string line breaks, cf. workflow doc: .. [#tool_style_conflicts] For example, lines over 80 characters are allowed for text strings to make it possible to search the code for them: please see `Linux kernel style (breaking long lines and strings) <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_ and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
* ISIS VRF: ISIS Debug structure modificationsharios2020-06-241-26/+26
| | | | | | 1. The "isis->debug" variable dependency on debug logs print is removed. Signed-off-by: harios <hari@niralnetworks.com>
* isisd: Prevent use after free for isis_adj_state_changeDonald Sharp2020-04-181-42/+44
| | | | | | | | When we call isis_adj_state_change with ISIS_ADJ_DOWN we free the pointer, but we were still using the pointer after it was freed. Cleanup the api to prevent this. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* isisd: Fix spelling mistakes found by debian packagingDonald Sharp2020-03-141-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* isisd: Free memory when confusedDonald Sharp2019-12-131-0/+2
| | | | | | | | | | When you call into lsp_update with confusion, the lsp is purged and we do not do anything with the created tlv's from parsing the incoming data. To prevent the tlv's from being leaked note confusion and delete the unneeded data. Fixes: #5496 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* isisd: split northbound callbacks into multiple filesRenato Westphal2019-10-301-0/+1
| | | | | | | | | | | | | | | | | Rearrange the isisd northbound callbacks as following: * isis_nb.h: prototypes of all northbound callbacks. * isis_nb.c: definition of all northbound callbacks and their associated YANG data paths. * isis_nb_config.c: implementation of YANG configuration nodes. * isis_nb_state.c: implementation of YANG state nodes. * isis_nb_notifications.c: implementation of YANG notifications. This should help to keep to code more organized and easier to maintain. No behavior changes intended. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* isisd: Fix handling of neighbor circuit id in three way handshakeChristian Franke2019-10-011-1/+1
| | | | | | | | | | | | | | | | | | RFC 5303 states: If the system ID and Extended Local Circuit ID of the neighboring system are known (in adjacency three-way state Initializing or Up), the neighbor's system ID SHALL be reported in the Neighbor System ID field, and the neighbor's Extended Local Circuit ID SHALL be reported in the Neighbor Extended Local Circuit ID field. There is nothing written about only setting the Extended circuit ID of the adjacency only when we bring the three-way adjacency up. In fact, we should always update it, to avoid the problem described in #4783. Fixes: #4783 Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd, yang: implement interface countersRenato Westphal2019-09-231-6/+27
| | | | | | | | The new "event-counters" grouping is almost a 1:1 copy of the same grouping from the IETF IS-IS module, except for the "lan-dis-changes" leaf which was skipped (more work needs to be done to support it). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* isisd: Update TLVs processing for TE, RI & SROlivier Dugeon2019-09-171-7/+0
| | | | | | | | | | | | | | | | | | | | | In preparation to Segment Routing: - Update the management of Traffic Engineering subTLVs to the new tlvs parser - Add Router Capability TLV 242 as per RFC 4971 & 7981 - Add Segment Routing subTLVs as per draft-isis-segment-routing-extension-25 Modified files: - isis_tlvs.h: add new structure to manage TE subTLVs, TLV 242 & SR subTLVs - isis_tlvs.c: add new functions (pack, copy, free, unpack & print) to process TE subTLVs, Router Capability TLV and SR subTLVs - isis_circuit.[c,h] & isis_lsp.[c,h]: update to new subTLVs & TLV processing - isis_te.[c,h]: remove all old TE structures and managment functions, and add hook call to set local and remote IP addresses as wellas update TE parameters - isis_zebra.[c,h]: add hook call when new interface is up - isis_mt.[c,h], isis_pdu.c & isis_northbound.c: adjust to new TE subTLVs - tests/isisd/test_fuzz_isis_tlv_tests.h.gz: adapte fuuz tests to new parser Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* *: rename new ForEach macros from the typesafe APIRenato Westphal2019-05-211-1/+1
| | | | | | | | | This is necessary to avoid a name collision with std::for_each from C++. Fixes the compilation of the gRPC northbound module. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #3045 from opensourcerouting/atomsLou Berger2019-04-301-23/+17
|\ | | | | READY: lists/skiplists/rb-trees new API & sequence lock & atomic lists
| * isisd: replace dict_* with DECLARE_RBTREEDavid Lamparter2019-04-271-23/+17
| | | | | | | | | | | | | | | | Historically, isisd has been carrying around its own red-black tree to manage its LSP DB in. This replaces that with the newly-added DECLARE_RBTREE_*. This allows completely removing the dict_* code. Signed-off-by: David Lamparter <equinox@diac24.net>
* | isisd: Add IS-IS-TE support per AreaOlivier Dugeon2019-04-251-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Solve issue #4032 - Change MPLS-TE from global to per Area - Add new mpls_te_area structure to area in replacement of global variable isisMPLS_TE - Move mpls-te from global to instance in frr-isisd.yang - Change code in isis_te.c, isis_northbound.c, isis_cli.c, isis_pdu.c, isis_lsp.c and isis_zebra.c accordingly Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* | Revert "isisd: Add IS-IS-TE support per Area"Russ White2019-04-231-3/+2
| |
* | Issue #4032: Add IS-IS-TE support per AreaOlivier Dugeon2019-04-151-2/+3
|/ | | | | | | | | | | - Change MPLS-TE from global to per Area - Add new mpls_te_area structure to area in replacement of global variable isisMPLS_TE - Move mpls-te frmo global to instance in frr-isisd.yang - Change code in isis_te.c, isis_northbound.c, isis_cli.c, isis_pdu.c, isis_lsp.c and isis_zebra.c accordingly Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* *: remove trailing newlines from zlog messagesQuentin Young2019-03-141-3/+3
| | | | | | Zlog puts its own newlines on, and doing this makes logs look nasty. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>