summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-06-02ci: only run conflict check on pull-requestsChristian Hopps
This change will stop this action from running on forked repos. Previously whenever one pushed a change to one's development branch the action would "run but skip" which still generated an email notifications and thus was very annoying. :) Signed-off-by: Christian Hopps <chopps@labn.net>
2024-06-01Merge pull request #16139 from donaldsharp/mroute_errorChristian Hopps
pimd: Give a clearer warning when the kernel is not compiled right
2024-06-01Merge pull request #16127 from opensourcerouting/fix/eor_not_only_for_grDonald Sharp
bgpd: Send End-of-RIB not only if Graceful Restart capability is received
2024-06-01Merge pull request #16121 from LabNConsulting/chopps/docker-updateDonald Sharp
Update ubuntu docker images adding github build and test action
2024-05-31github: add docker build and test github actionChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-31pimd: Give a clearer warning when the kernel is not compiled rightDonald Sharp
When the kernel is not compiled with mroute vrf's enabled it will fail the call to initialize the vrf. As such let's recognize this specific error code and output a specific warning to the operator to help them figure this problem out. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-05-31docker: update docker reference to follow latest docsChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-31Merge pull request #16111 from donaldsharp/ospfv3_read_afterJafar Al-Gharaibeh
ospf6d: Prevent heap-buffer-overflow with unknown type
2024-05-31Merge pull request #16115 from Jafaral/pim-ssm-anyDonald Sharp
pimd: fix crash when mixing ssm/any-source joins
2024-05-31Merge pull request #16125 from opensourcerouting/ts-expand-fix-guardDonald Sharp
lib: make `python/ts_expand.py` actually work
2024-05-31Merge pull request #16124 from LabNConsulting/chopps/test-cleanupDonald Sharp
Fix grpc-client parallel run and other small test fixes
2024-05-31bgpd: Send End-of-RIB not only if Graceful Restart capability is receivedDonatas Abraitis
Before we checked for received Graceful Restart capability, but that was also incorrect, because we SHOULD HAVE checked it per AFI/SAFI instead. https://datatracker.ietf.org/doc/html/rfc4724 says: Although the End-of-RIB marker is specified for the purpose of BGP graceful restart, it is noted that the generation of such a marker upon completion of the initial update would be useful for routing convergence in general, and thus the practice is recommended. Thus, it might be reasonable to send EoR regardless of whether the Graceful Restart capability is received or not from the peer. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-05-31lib: make python/ts_expand.py actually workDavid Lamparter
lib/typesafe.h was supposed to be outside the _TYPESAFE_EXPAND_MACROS guard, so that including lib/atomlist.h grabs all the typesafe container macros. (No effect on normal build, as _TYPESAFE_EXPAND_MACROS is never defined there.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-05-31tests: use raw string for doc to avoid deprecated python warningChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-31tests: all errors go to log (and thus stderr)Christian Hopps
Only output requested information to stdout so it can be filtered and captured in shell variables etc... Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-31tests: fix pim test to wait for actual OSPF route convergenceChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-31tests: fix multiple grpc-client.py running in parallelChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-30pimd: fix crash when mixing ssm/any-source joinsJafar Al-Gharaibeh
There is no reason to call `igmp_anysource_forward_stop()` inside a call to `igmp_get_source_by_addr()`; not only it is not expected for a "get" function to perform such an action, but also the decision to start/stop forwarding is already handled correctly by pim outside `igmp_get_source_by_addr()`. That call was left there from the days pim was initially imported into the sources. The problem/crash was happening because `igmp_find_source_by_addr()` would fail to find the group/source combo when mixing `(*, G)` and `(S, G)`. When having an existing flow `(*, G)`, and a new `(S, G)` igmp is received, a new entry is correctly created. `igmp_anysource_forward_stop(group)` always stops and eventually frees `(*, G)`, even when the new igmp is `(S, G)`, leaving a bad state. I.e, the new entry for `(S, G)` causes `(*, G)` to be deleted. Tested the fix with multiple receivers on the same interface with several ssm and any source senders and receivers with various combination of start/stop orders and they all worked correctly. Fixes: #15630 Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-05-30Merge pull request #15879 from LabNConsulting/dleroy/nhrpd-shutdown-fixJafar Al-Gharaibeh
nhrpd: fixes core dump on shutdown
2024-05-30tests: add a topotest to verify nhrp shortcuts in a redundant nhs topologydleroy
Contains 2 testcases. The first does a basic configuration/connectivity. The second testcase initiates a shortcut through the primary NHS, verifies shortcut routes are installed. Primary NHS interface brought down and verify that the shortcut is not impacted. Finally verify that after the shortcut expires, it is able to be re-established via a backup NHS. Signed-off-by: dleroy <dleroy@labn.net>
2024-05-30nhrpd: fixes core dump on shutdowndleroy
When nhrpd is shutdown via nhrp_request_stop() the shutdown sequence was not handling the case where there are active shortcut routes installed. The zebra client and shortcut rib were being cleaned up before vrf_terminate() had an opportunity to delete the active routes. Signed-off-by: dleroy <dleroy@labn.net>
2024-05-30ospf6d: Prevent heap-buffer-overflow with unknown typeIggy Frankovic
When parsing a osf6 grace lsa field and we receive an unknown tlv type, ospf6d was not incrementing the pointer to get beyond the tlv. Leaving a situation where ospf6d would parse the packet incorrectly. Signed-off-by: Iggy Frankovic <iggy07@gmail.com>
2024-05-30Merge pull request #16109 from donaldsharp/seg6_topotest_fixDonatas Abraitis
tests: Fix zebra_seg6_route
2024-05-29Merge pull request #16102 from lsang6WIND/relative_pathDonald Sharp
yang: use relative path instead of absolute one for route-map
2024-05-29tests: Fix zebra_seg6_routeDonald Sharp
Locally this test would occassionally fail for me because the connected route the sharp route being installed has not fully come up yet due to heavy load and start up slowness. Add a bit of code to look for the problem and make sure it doesn't happen. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-05-29Merge pull request #16098 from ↵Donald Sharp
LabNConsulting/aceelindem/ospfv3-route-asbr-change ospf6d: OSPFv3 route change comparision fixed for ASBR-only change
2024-05-29Merge pull request #16097 from ↵Donald Sharp
opensourcerouting/fix/safety_check_for_extcommunities bgpd: Make sure we have enough data to handle extended link bandwidth
2024-05-29yang: use relative path instead of absolute one for route-mapLoïc Sang
Using absolute xpath is not optimal for finding the target node. As the route map configuration grows, the yang validation will take more time to complete. Relative paths are much faster. Tested with a config file that contains ~3k route map config lines. - before: time cat conf | vtysh configure log syslog errors router bgp 65000 ! route-map RM:BGP:VPNV4:PEER:VRR9:IN10001 permit 101 match community CL:HCC:PATH_PRIO1_EAST1 set local-preference 15200 ! ... route-map RM:BGP:VPNV4:PEER:VRR9:IN10001 permit 1182 match community CL:HCC:PATH_PRIO1_EAST1082 set local-preference 16281 ! real 13m51.500s user 0m0.522s sys 0m4.854s - after: time cat conf | vtysh ... real 0m48.390s user 0m0.384s sys 0m1.245s Signed-off-by: Loïc Sang <loic.sang@6wind.com>
2024-05-29Merge pull request #15082 from louis-6wind/fix-iff-lower-upIgor Ryzhov
lib: take into account the Linux IFF_LOWER_UP flag
2024-05-28ospf6d: OSPFv3 route change comparision fixed for ASBR-only changeAcee
When a router route already exists in the area border routers table as an ABR and it solely changes its ABR or ASBR status, the change was missed and border route is not updated. This fixes the comparison for the router_bits in the ospf6_path structure. This fixes issue https://github.com/FRRouting/frr/issues/16053 although the actual problem is not the computing router (r2) and not the OSPFv3 redistribution (r3). Signed-off-by: Acee <aceelindem@gmail.com>
2024-05-28Merge pull request #16055 from acooks-at-bda/cleanup-some-ospf6-lsa-macrosDonald Sharp
Cleanup some OSPF6_LSA_ macros
2024-05-28Merge pull request #16075 from anlancs/ospfd/fix-cmd-instanceDonald Sharp
ospfd: add instance id for one command
2024-05-28Merge pull request #15993 from zhou-run/202405091114Russ White
isisd: fix crash when deactivating ISIS adjacency on the interface.
2024-05-28Merge pull request #16083 from ↵Russ White
opensourcerouting/fix/overflow_bgp_dynamic_capability BGP dynamic capability some fixes
2024-05-28Merge pull request #16023 from opensourcerouting/fix/rpki_show_stuffRuss White
bgpd: Split `rpki cache` command into separate per SSH/TCP
2024-05-28Merge pull request #16091 from y-bharath14/srib-topotests-commitsDonald Sharp
tests: Organizing variables using format method
2024-05-28isisd: fix crash when deactivating ISIS adjacency on the interface.zhou-run
1. When the command "no <ip|ipv6> router isis WORD" is executed on the interface, it invokes list_delete_all_node to iterate and release the memory of all nodes in the cirtcuit->u.bc.adjdb[1] linked list. However, the nodes are not unlinked during this traversal process, leading to the call of *list->del to delete the data of the linked list nodes. 2. For ISIS, deleting the data of the linked list nodes is done by calling isis_delete_adj. Subsequently, isis_level2_adj_up will be called to iterate and query the cirtcuit->u.bc.adjdb[1] linked list. If there are many neighbors on this interface, accessing the memory of the released linked list nodes may occur. 3. Not limited to ISIS, if the linked list is not unlinked during the deletion of all nodes in process 1, *list->del should not be allowed to iterate through the list again. The backtrace is as follows: (gdb) bt at isisd/isis_csm.c:196 context=<optimized out>) at lib/northbound.c:1131 errmsg_len=errmsg_len@entry=8192) at lib/northbound.c:1356 at lib/northbound.c:1473 errmsg=errmsg@entry=0x7ffc0ced38d0 "", errmsg_len=errmsg_len@entry=8192) at lib/northbound.c:906 comment=comment@entry=0x0, transaction_id=transaction_id@entry=0x0, errmsg=errmsg@entry=0x7ffc0ced38d0 "", errmsg_len=8192) at lib/northbound.c:938 filter=FILTER_RELAXED) at lib/command.c:971 at lib/command.c:1030 vtysh=vtysh@entry=0) at lib/command.c:1198 at isisd/isis_csm.c:196 context=<optimized out>) at lib/northbound.c:1131 errmsg_len=errmsg_len@entry=8192) at lib/northbound.c:1356 at lib/northbound.c:1473 errmsg=errmsg@entry=0x7ffc0ced38d0 "", errmsg_len=errmsg_len@entry=8192) at lib/northbound.c:906 comment=comment@entry=0x0, transaction_id=transaction_id@entry=0x0, errmsg=errmsg@entry=0x7ffc0ced38d0 "", errmsg_len=8192) at lib/northbound.c:938 filter=FILTER_RELAXED) at lib/command.c:971 at lib/command.c:1030 vtysh=vtysh@entry=0) at lib/command.c:1198 0 0x00007f7d6e541fe1 in raise () from /lib/x86_64-linux-gnu/libpthread.so.0 1 0x00007f7d6e63188c in core_handler (signo=11, siginfo=0x7ffc0ced2630, context=<optimized out>) at lib/sigevent.c:262 2 <signal handler called> 3 0x00005647f5b11568 in isis_level2_adj_up (area=area@entry=0x5647f7c89830) at isisd/isis_lsp.c:423 4 0x00005647f5b14073 in isis_reset_attach_bit (adj=0x5647f7cad690) at isisd/isis_lsp.c:474 5 lsp_handle_adj_state_change (adj=0x5647f7cad690) at isisd/isis_lsp.c:2162 6 0x00005647f5b53675 in hook_call_isis_adj_state_change_hook (adj=adj@entry=0x5647f7cad690) at isisd/isis_adjacency.c:152 7 0x00005647f5b536f3 in isis_delete_adj (arg=0x5647f7cad690) at isisd/isis_adjacency.c:167 8 0x00007f7d6e5fe003 in list_delete_all_node (list=0x5647f7c88060) at lib/linklist.c:316 9 0x00007f7d6e5fe069 in list_delete (list=list@entry=0x5647f7c84708) at lib/linklist.c:326 10 0x00005647f5b0872e in isis_circuit_down (circuit=0x5647f7c84620) at isisd/isis_circuit.c:835 11 0x00005647f5b09f81 in isis_csm_state_change (event=event@entry=IF_DOWN_FROM_Z, circuit=circuit@entry=0x5647f7c84620, arg=arg@entry=0x5647f7c7f7a0) at isisd/isis_csm.c:196 12 0x00005647f5b083b0 in isis_circuit_disable (circuit=0x5647f7c84620) at isisd/isis_circuit.c:100 13 isis_circuit_del (circuit=0x5647f7c84620) at isisd/isis_circuit.c:200 14 0x00005647f5b434f5 in lib_interface_isis_destroy (args=<optimized out>) at isisd/isis_nb_config.c:2612 15 0x00007f7d6e61347a in nb_callback_destroy (errmsg_len=2, errmsg=0x7ffc0ced38d0 "", dnode=0x5647f7c948f0, event=NB_EV_APPLY, nb_node=<optimized out>, context=<optimized out>) at lib/northbound.c:1131 16 nb_callback_configuration (context=<optimized out>, event=event@entry=NB_EV_APPLY, change=change@entry=0x5647f7cb6680, errmsg=errmsg@entry=0x7ffc0ced38d0 "", errmsg_len=errmsg_len@entry=8192) at lib/northbound.c:1356 17 0x00007f7d6e6138b7 in nb_transaction_process (errmsg_len=8192, errmsg=0x7ffc0ced38d0 "", transaction=0x5647f7c94080, event=NB_EV_APPLY) at lib/northbound.c:1473 18 nb_candidate_commit_apply (transaction=0x5647f7c94080, save_transaction=save_transaction@entry=true, transaction_id=transaction_id@entry=0x0, errmsg=errmsg@entry=0x7ffc0ced38d0 "", errmsg_len=errmsg_len@entry=8192) at lib/northbound.c:906 19 0x00007f7d6e61403d in nb_candidate_commit (context=context@entry=0x7ffc0ced38c0, candidate=<optimized out>, save_transaction=save_transaction@entry=true, comment=comment@entry=0x0, transaction_id=transaction_id@entry=0x0, errmsg=errmsg@entry=0x7ffc0ced38d0 "", errmsg_len=8192) at lib/northbound.c:938 20 0x00007f7d6e616ec9 in nb_cli_classic_commit (vty=0x5647f7cae160) at lib/northbound_cli.c:64 21 0x00007f7d6e6176a8 in nb_cli_apply_changes (vty=0x5647f7cae160, xpath_base_fmt=<optimized out>) at lib/northbound_cli.c:268 22 0x00007f7d6e5d918e in cmd_execute_command_real (vline=vline@entry=0x5647f7cae140, vty=vty@entry=0x5647f7cae160, cmd=cmd@entry=0x0, up_level=up_level@entry=0, filter=FILTER_RELAXED) at lib/command.c:971 23 0x00007f7d6e5d951d in cmd_execute_command (vline=vline@entry=0x5647f7cae140, vty=vty@entry=0x5647f7cae160, cmd=cmd@entry=0x0, vtysh=vtysh@entry=0) at lib/command.c:1030 24 0x00007f7d6e5d9770 in cmd_execute (vty=vty@entry=0x5647f7cae160, cmd=cmd@entry=0x5647f7cb48a0 "no ip router isis 10", matched=matched@entry=0x0, vtysh=vtysh@entry=0) at lib/command.c:1198 25 0x00007f7d6e6485e6 in vty_command (vty=vty@entry=0x5647f7cae160, buf=0x5647f7cb48a0 "no ip router isis 10") at lib/vty.c:483 26 0x00007f7d6e648d01 in vty_execute (vty=vty@entry=0x5647f7cae160) at lib/vty.c:1246 27 0x00007f7d6e64ba40 in vtysh_read (thread=<optimized out>) at lib/vty.c:2090 28 0x00007f7d6e64348d in thread_call (thread=thread@entry=0x7ffc0ced8310) at lib/thread.c:1958 29 0x00007f7d6e5fd4a8 in frr_run (master=0x5647f79a43d0) at lib/libfrr.c:1184 30 0x00005647f5b050f3 in main (argc=5, argv=<optimized out>, envp=<optimized out>) at isisd/isis_main.c:273 (gdb) f 3 423 isisd/isis_lsp.c: No such file or directory. (gdb) p node $1 = (struct listnode *) 0x110 (gdb) f 8 316 lib/linklist.c: No such file or directory. (gdb) p list->head->data $2 = (void *) 0x5647f7cabf20 (gdb) p list->head->next->data $3 = (void *) 0x5647f7c9bb60 (gdb) p list->head->next->next->data Cannot access memory at address 0x120 (gdb) p list->head->next->next $4 = (struct listnode *) 0x110 The backtrace provided above pertains to version 8.2.2, but it seems that the same issue exists in the code of the master branch as well. isis_reset_attach_bit() is useless because lsp_handle_adj_state_change() unconditionally calls lsp_regenerate_schedule. Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>
2024-05-28ospf6d: replace OSPF6_LSA_SIZE with ospf6_lsa_sizeAndrew Cooks
Dropping the macro enables better compiler type checking. The macro was not used consistently when reading the lsa size from the header, so this change also aims to use the replacement inline function consistently. Keeping the inline function has (marginal) utility in that it ensures that the endian conversion is consistently performed. Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-05-28ospf6d: replace OSPF6_LSA_END with ospf6_lsa_endAndrew Cooks
Replacing the macro with an inline function enables better type checking. No functional change. Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-05-28ospf6d: replace OSPF6_LSA_HEADER_END macroAndrew Cooks
Replacing the macro with an inline function allows the compiler to check the parameter type. Use the replacement function consistently to reduce the number of open coded pointer cast plus offset calculations. use tools/indent.py to reformat all occurences of its use. Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-05-27Merge pull request #16089 from LabNConsulting/chopps/docfixDonatas Abraitis
doc: add missing required newline in .rst formatting
2024-05-27tests: Organizing variables using format methodY Bharath
Using format method to look code more presentable and readable Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2024-05-26doc: add missing required newline in .rst formattingChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-26bgpd: Make sure we have enough data to handle extended link bandwidthDonatas Abraitis
Extended link bandwidth is encoded inside extended community as a ipv6-address specific extended community, but with a malformed packet we should do the sanity check here to have enough data. Especially before doing ptr_get_be64(). Reported-by: Iggy Frankovic <iggyfran@amazon.com> Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-05-26bgpd: Add a safety check for ecommunity_ecom2strDonatas Abraitis
Just in case we have enough data according to the community unit size. It should be 8 or 20 (for now). Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-05-26bgpd: Convert unk_ecom to booleanDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-05-26Merge pull request #16070 from Pdoijode/pdoijode/lcomm-not-found-fixDonatas Abraitis
bgpd: Return success if lcomm/comm/extcomm name or entry is not found
2024-05-25doc: adjust one ospf commandanlan_cs
Signed-off-by: anlan_cs <anlan_cs@tom.com>
2024-05-25ospfd: add instance id for one commandanlan_cs
Add the specific instance id for the command: ``` show ip ospf [{(1-65535)$instance|vrf <NAME|all>}] graceful-restart helper [detail] [json] ``` Signed-off-by: anlan_cs <anlan_cs@tom.com>
2024-05-24Merge pull request #15674 from Orange-OpenSource/ospfd-teJafar Al-Gharaibeh
ospfd: Solved crash in RI parsing with OSPF TE