summaryrefslogtreecommitdiffstats
path: root/pimd/AUTHORS (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-10-08zebra: Do not retry in 30 seconds on pw reachability failureDonald Sharp1-1/+8
Currently the zebra pw code has setup a retry to install the pw after 30 seconds when it is decided that reachability to the pw is gone. This causes a failure mode where the pw code just goes and re-installs the pw after 30 seconds in the non-reachability case. Instead it should just be reinstalling after reachability is restored. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-08zebra: Move pw status settting until after we get resultsDonald Sharp3-29/+23
Currently the pw code sets the status of the pw for install and uninstall immediately when notifying the dplane. This is incorrect in that we do not actually know the status at this point in time. When we get the result is when to set the status. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-08pimd: fix a possible crash when enabling debug autorpJafar Al-Gharaibeh1-2/+2
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-10-07vrrpd: iterate over all ancillary messagesRafael Zalamena1-1/+1
Assign the return of `CMSG_NXTHDR` so we can really iterate over the ancillary data. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-10-07lib: add flag to have libyang load internal ietf-yang-library moduleChristian Hopps19-30/+40
Mgmtd makes use of libyang's internal ietf-yang-library module to add support for said module to FRR management. Previously, mgmtd was loading this module explicitly; however, that required that libyang's `ietf-yang-library.yang` module definition file be co-located with FRR's yang files so that it (and ietf-datastore.yang) would be found when searched for by libyang using FRRs search path. This isn't always the case depending on how the user compiles and installs libyang so mgmtd was failing to run in some cases. Instead of doing it the above way we simply tell libyang to load it's internal version of ietf-yang-library when we initialize the libyang context. This required adding a boolean to a couple of the init functions which is why so many files are touched (although all the changes are minimal). Signed-off-by: Christian Hopps <chopps@labn.net>
2024-10-07isisd: fix wrong check for MT commandsanlan_cs1-8/+0
``` anlan# show run ! interface eth0 ip router isis A exit ! router isis A metric-style narrow <- NOT wide exit ! end anlan (config)# int eth0 anlan (config-if)# no isis topology ipv6-unicast % Configuration failed. Error type: validation Error description: Multi topology IS-IS can only be used with wide metrics ``` The MT commands are mainly controlled by the binded area, not by interface. Currently if there is any MT configuration in the area, `metric-style` must be with the `wide` mode, this requirement is sufficient. So, the unnecessary/wrong check for MT in the interface should be removed. Signed-off-by: anlan_cs <anlan_cs@126.com>
2024-10-07lib,zebra: remove unused ZEBRA_VRF_UNREGISTERDonna Sharp3-19/+0
Signed-off-by: Donna Sharp <dksharp5@gmail.com>
2024-10-07zebra: remove unsued function from tc_netlink.cDonna Sharp1-21/+0
Signed-off-by: Donna Sharp <dksharp5@gmail.com>
2024-10-07zebra: remove unused function from if_netlink.cDonna Sharp3-223/+0
Signed-off-by: Donna Sharp <dksharp5@gmail.com>
2024-10-07zebra: remove unused function from tc_netlink.cDonna Sharp2-21/+0
Signed-off-by: Donna Sharp <dksharp5@gmail.com>
2024-10-07zebra: remove unused function rib_lookup_ipv4Donna Sharp2-42/+0
Signed-off-by: Donna Sharp <dksharp5@gmail.com>
2024-10-05tools: fix some special commands for reloading pimanlan_cs1-1/+6
The issue is we can't remove all pim configurations including some special configurations (e.g., `no ip pim bsm`) for one interface. For one pim-disable interface, all such pim depdendent options (including `ip pim ` and `no ip pim `) should be completely removed. Also append `no ip multicast` for the same purpose, it is no use at present, but for future use. The running config: ``` interface A ip pim no ip pim bsm exit ``` Reload the new config: ``` interface A exit ``` Before: ``` 2024-10-05 20:52:33,467 INFO: Executed "interface A no ip pim exit" 2024-10-05 20:52:33,482 INFO: Executed "interface A ip pim bsm exit" ``` And the pim configurations in running configuration are not removed after reloading: ``` interface A ip pim <- Wrong exit ``` After: ``` 2024-10-05 20:56:27,489 INFO: Executed "interface A no ip pim exit" ``` And all the pim configuration are removed. Signed-off-by: anlan_cs <anlan_cs@126.com>
2024-10-04zebra: Fix crash during reconnectIgor Zhukov1-1/+1
fpm_enqueue_rmac_table expects an fpm_rmac_arg* as its argument. The issue can be reproduced by dropping the TCP session using: ss -K dst 127.0.0.1 dport = 2620 I used Fedora 40 and frr 9.1.2 and I got the gdb backtrace: (gdb) bt 0 0x00007fdd7d6997ea in fpm_enqueue_rmac_table (bucket=0x2134dd0, arg=0x2132b60) at zebra/dplane_fpm_nl.c:1217 1 0x00007fdd7dd1560d in hash_iterate (hash=0x21335f0, func=0x7fdd7d6997a0 <fpm_enqueue_rmac_table>, arg=0x2132b60) at lib/hash.c:252 2 0x00007fdd7dd1560d in hash_iterate (hash=0x1e5bf10, func=func@entry=0x7fdd7d698900 <fpm_enqueue_l3vni_table>, arg=arg@entry=0x7ffed983bef0) at lib/hash.c:252 3 0x00007fdd7d698b5c in fpm_rmac_send (t=<optimized out>) at zebra/dplane_fpm_nl.c:1262 4 0x00007fdd7dd6ce22 in event_call (thread=thread@entry=0x7ffed983c010) at lib/event.c:1970 5 0x00007fdd7dd20758 in frr_run (master=0x1d27f10) at lib/libfrr.c:1213 6 0x0000000000425588 in main (argc=10, argv=0x7ffed983c2e8) at zebra/main.c:492 Signed-off-by: Igor Zhukov <fsb4000@yandex.ru>
2024-10-03bgpd: export labels to pre-policy bmpLouis Scalbert1-11/+13
Export labels to pre-policy BMP Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-03lib: remove unused bfd definesLouis Scalbert1-6/+0
Remove unused bfd defines Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-03bfdd: add no variants to all configurationsLouis Scalbert1-4/+7
Continue the work of b70835d690 ("bfdd: add no variants to interval configurations") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-03bgpd: changes for code maintainabilitysri-mohan11-96/+79
these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2024-10-03bgpd: Print debug message about reaching maximum allowed multi pathsDonatas Abraitis1-1/+2
Fixes: 421cf856ef86db250a86be01437d0a668b463dcc ("bgpd: Cleanup multipath figuring out in bgp") Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-02bgpd: Remove unused bgp_mp_dmed_deselect functionDonald Sharp2-19/+0
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-02bgpd: fix printfrr_bp for non initialized peersLouis Scalbert1-0/+6
Fix printfrr_bp for non initialized peers. For example: > Sep 26 17:56:44 r1 bgpd[26295]: [GJPH1-W8PZV] Resetting peer (null)(Unknown) due to change in addpath config Is now: > Oct 02 14:00:59 r1 bgpd[12795]: [MNE5N-K0G4Z] Resetting peer 2.2.2.2 due to change in addpath config Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-02bgpd: Actually make ` --v6-with-v4-nexthops` it workDonatas Abraitis2-17/+17
It was using `-v` which is actually a _version_. Fixes: 0435b31bb8ed55377f83d0e19bc085abc3c71b44 ("bgpd: Allow bgp to specify if it will allow v6 routing with v4 nexthops") Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-01bfdd: add no variants to interval configurationsRafael Zalamena1-16/+25
Add missing no commands to various interval configurations. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-10-01lib: nexthop code should use uint16_t for nexthop countingDonald Sharp2-15/+11
It's possible to specify via the cli and configure how many nexthops that are allowed on the system. If you happen to have > 255 then things are about to get interesting otherwise. Let's allow up to 65k nexthops (ha!) Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-01tests: Check if loopback routes are considered valid for nexthop trackingDonatas Abraitis5-0/+170
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-01bgpd: Relax the same prefix and nexthop to be validDonatas Abraitis1-5/+4
Treat as next-hop invalid if import check is enabled. Fixes: 654a5978f695087af062bfc9a382321fa2ccc4ae ("bgpd: prevent routes loop through itself") Fixes: https://github.com/FRRouting/frr/issues/16877 Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-01tests: Drop test_bgp_with_loopback_with_same_subnet_p1Donatas Abraitis1-289/+0
It's replaced and simplified by c3fd1e9520c619babb3004cea6df622ca67b0dfa. JSON topo is just horrible to debug. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-01bgpd: Remove bgp_path_info_mpath_dequeueDonald Sharp3-18/+0
This function is no doing any work. Let's remove. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-01bgpd: Cleanup multipath figuring out in bgpDonald Sharp8-850/+135
Currently bgp multipath has these properties: a) mp_info may or may not be on a single path, based upon path perturbations in the past. b) mp_info->count started counting at 0( meaning 1 ). As that the bestpath path_info was never included in the count c) The first mp_info in the list held the multipath data associated with the multipath. As such if you were at any other node that data was not filled in. d) As such the mp_info's that are not first on the list basically were just pointers to the corresponding bgp_path_info that was in the multipath. e) On bestpath calculation, a linklist(struct linklist *) of bgp_path_info's was created. f) This linklist was passed in to a comparison function that took the old mpinfo list and compared it item by item to the linklist and doing magic to figure out how to create a new mp_info list. g) the old mp_info and the link list had to be memory managed and freed up. h) BGP_PATH_MULTIPATH is only set on non bestpath nodes in the multipath. This is really complicated. Let's change the algorithm to this: a) When running bestpath, mark a bgp_path_info node that could be in the ecmp path as BGP_PATH_MULTIPATH_NEW. b) When running multipath, just walk the list of bgp_path_info's and if it has BGP_PATH_MULTIPATH_NEW on it, decide if it is in BGP_MULTIPATH. If we run out of space to put in the ecmp, clear the flag on the rest. c) Clean up the counting of sometimes adding 1 to the mpath count. d) Only allocate a mpath_info node for the bestpath. Clean it up when done with it. e) remove the unneeded list management associated with the linklist and the mp_list. This greatly simplifies multipath computation for bgp and reduces memory load for large scale deployments. 2 full feeds in work_queue_run prior: 0 56367.471 1123 50193 493695 50362 493791 0 0 0 TE work_queue_run BGP multipath info : 1941844 48 110780992 1941844 110780992 2 full feeds in work_queue_run after change: 1 52924.931 1296 40837 465968 41025 487390 0 0 1 TE work_queue_run BGP multipath info : 970860 32 38836880 970866 38837120 Aproximately 4 seconds of saved cpu time for convergence and ~75 mb smaller run time. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-01tests: Clean up some logging in test_bgp_default_originate_2links.pyDonald Sharp1-5/+6
Test was confusing. Add some useful data and clean up some debugs Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-01bgpd: Ensure mpath data is only on bestpathDonald Sharp2-3/+10
The mpath data structure has data that is only relevant for the first mpath in the list. It is not being used anywhere else. Let's document that a bit more. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-01bgpd: Use CHECK_FLAG to remain consistent for mp_flagsDonald Sharp1-2/+2
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-30lib: fix calloc warning on recent compilerRafael Zalamena1-1/+1
Fix the following compiler warning: ``` lib/elf_py.c: In function _elffile_load_: lib/elf_py.c:1310:34: warning: _calloc_ sizes specified with _sizeof_ in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 1310 | w->sects = calloc(sizeof(PyObject *), w->ehdr->e_shnum); | ^~~~~~~~ lib/elf_py.c:1310:34: note: earlier argument should specify number of elements, later size of each element ``` Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-09-30pimd: fix northbound error message on deleteRafael Zalamena1-15/+12
`snprintf` doesn't know about `%pPAs` use `snprintfrr` instead. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-09-30pimd: remove unreachable codeRafael Zalamena1-8/+0
MLD code is IPv6 only so the define `PIM_IPV` will never be 4. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-09-30pimd: fix missing IPV4 checkanlan_cs1-59/+48
In `pim_if_addr_add()`, some code inside `PIM_IPV == 4` ( the case of `igmp->mtrace_only` ) wrongly accepts ipv6 address. So, clearly add IPV4 check. Signed-off-by: anlan_cs <anlan_cs@126.com>
2024-09-29tools: fix missing check interfaces for reloading pimanlan_cs1-10/+10
Without checking interfaces, the other interfaces' changes will be wrongly lost. Running config: ``` interface A ip pim ip pim use-source 11.0.0.1 exit ! interface B ip pim ip pim use-source 22.0.0.1 exit ! ``` Reload the new config: ``` interface A exit ! interface B ip pim exit ``` Before: ``` 2024-09-29 10:08:27,686 INFO: Executed "interface A no ip pim exit" ``` After: ``` 2024-09-29 10:05:01,356 INFO: Executed "interface A no ip pim exit" 2024-09-29 10:05:01,376 INFO: Executed "interface B no ip pim use-source 22.0.0.1 exit" ``` Signed-off-by: anlan_cs <anlan_cs@126.com>
2024-09-27tests: enhance autorp topotestBarry A. Trent1-10/+144
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-09-27pimd: fix autorp CLI bugsBarry A. Trent3-6/+7
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-09-27tests: Check if we can see unmodified received-routes with soft inboundDonatas Abraitis4-0/+134
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-27bgpd: Show unmodified version of received-routes per neighborDonatas Abraitis1-4/+4
If we have soft inbound enabled, we should see how the route looks like before it was modified by a route-map/prefix-list. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-27isisd: Fix the PQ space computation error in TI-LFAb293321-1/+1
When there are pseudo-nodes on the device, during TI-LFA calculation of PQ space, even if this IS vertex is not originally a P/Q node, it might be calculated as a P/Q node due to the presence of pseudo-nodes, causing this IS vertex to become a P/Q node. Signed-off-by: baozhen-H3C <bao.zhen@h3c.com>
2024-09-27bgpd: changes for code maintainabilitysri-mohan11-17/+20
these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2024-09-26*: Modify clang-format column limit to 100Donald Sharp1-1/+1
A bunch of recent discussion has gone on about this. Let's see if we are actually interested in making a change. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-26bgpd: changes for code maintainabilitysri-mohan11-21/+23
these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2024-09-25pimd: fix a possible use after free bug when doing pim traceJafar Al-Gharaibeh1-1/+1
``` ERROR: AddressSanitizer: heap-use-after-free on address 0x6160000aecf0 at pc 0x5555557ecdb9 bp 0x7fffffffe350 sp 0x7fffffffe340 READ of size 4 at 0x6160000aecf0 thread T0 #0 0x5555557ecdb8 in igmp_source_delete pimd/pim_igmpv3.c:340 #1 0x5555557ed475 in igmp_source_delete_expired pimd/pim_igmpv3.c:405 #2 0x5555557de574 in igmp_group_timer pimd/pim_igmp.c:1346 #3 0x7ffff7275421 in event_call lib/event.c:1996 #4 0x7ffff7140797 in frr_run lib/libfrr.c:1237 #5 0x5555557f5840 in main pimd/pim_main.c:166 #6 0x7ffff6a54082 in __libc_start_main ../csu/libc-start.c:308 #7 0x555555686eed in _start (/usr/lib/frr/pimd+0x132eed) 0x6160000aecf0 is located 112 bytes inside of 600-byte region [0x6160000aec80,0x6160000aeed8) freed by thread T0 here: #0 0x7ffff767b40f in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:122 #1 0x7ffff716ed34 in qfree lib/memory.c:131 #2 0x5555557169ae in pim_channel_oil_free pimd/pim_oil.c:84 #3 0x555555717981 in pim_channel_oil_del pimd/pim_oil.c:199 #4 0x55555573c42c in tib_sg_gm_prune pimd/pim_tib.c:196 #5 0x5555557d6d04 in igmp_source_forward_stop pimd/pim_igmp.c:229 #6 0x5555557d5855 in igmp_anysource_forward_stop pimd/pim_igmp.c:61 #7 0x5555557de539 in igmp_group_timer pimd/pim_igmp.c:1344 #8 0x7ffff7275421 in event_call lib/event.c:1996 #9 0x7ffff7140797 in frr_run lib/libfrr.c:1237 #10 0x5555557f5840 in main pimd/pim_main.c:166 #11 0x7ffff6a54082 in __libc_start_main ../csu/libc-start.c:308 previously allocated by thread T0 here: #0 0x7ffff767ba06 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:153 #1 0x7ffff716ebe1 in qcalloc lib/memory.c:106 #2 0x555555716eb7 in pim_channel_oil_add pimd/pim_oil.c:133 #3 0x55555573b2b9 in tib_sg_oil_setup pimd/pim_tib.c:30 #4 0x55555573bdd3 in tib_sg_gm_join pimd/pim_tib.c:119 #5 0x5555557d6788 in igmp_source_forward_start pimd/pim_igmp.c:193 #6 0x5555557d5771 in igmp_anysource_forward_start pimd/pim_igmp.c:51 #7 0x5555557ecaa0 in group_exclude_fwd_anysrc_ifempty pimd/pim_igmpv3.c:310 #8 0x5555557ef937 in toex_incl pimd/pim_igmpv3.c:839 #9 0x5555557f00a2 in igmpv3_report_toex pimd/pim_igmpv3.c:938 #10 0x5555557f543d in igmp_v3_recv_report pimd/pim_igmpv3.c:2000 #11 0x5555557da2b4 in pim_igmp_packet pimd/pim_igmp.c:787 #12 0x5555556ee46a in process_igmp_packet pimd/pim_mroute.c:763 #13 0x5555556ee5f3 in pim_mroute_msg pimd/pim_mroute.c:787 #14 0x5555556eef58 in mroute_read pimd/pim_mroute.c:877 #15 0x7ffff7275421 in event_call lib/event.c:1996 #16 0x7ffff7140797 in frr_run lib/libfrr.c:1237 #17 0x5555557f5840 in main pimd/pim_main.c:166 #18 0x7ffff6a54082 in __libc_start_main ../csu/libc-start.c:308 SUMMARY: AddressSanitizer: heap-use-after-free pimd/pim_igmpv3.c:340 in igmp_source_delete Shadow bytes around the buggy address: 0x0c2c8000dd40: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2c8000dd50: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2c8000dd60: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2c8000dd70: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2c8000dd80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c2c8000dd90: fd fd fd fd fd fd fd fd fd fd fd fd fd fd[fd]fd 0x0c2c8000dda0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2c8000ddb0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2c8000ddc0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2c8000ddd0: fd fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa 0x0c2c8000dde0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ``` Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-09-25zebra: Add missing proto translationsDonald Sharp1-0/+4
Add missing isis and eigrp proto translations. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-25zebra: Correctly report metricsDonald Sharp1-5/+5
Report the routes metric in IPFORWARDMETRIC1 and return -1 for the other metrics as required by the IP-FORWARD-MIB. inetCidrRouteMetric2 OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-create STATUS current DESCRIPTION "An alternate routing metric for this route. The semantics of this metric are determined by the routing- protocol specified in the route's inetCidrRouteProto value. If this metric is not used, its value should be set to -1." DEFVAL { -1 } ::= { inetCidrRouteEntry 13 } I've included metric2 but it's the same for all of them. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-25zebra: Let's use memset instead of walking bytes and setting to 0Donald Sharp1-8/+2
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-25zebra: Fix snmp walk of zebra ribDonald Sharp1-2/+4
The snmp walk of the zebra rib was skipping entries because in_addr_cmp was replaced with a prefix_cmp which worked slightly differently causing parts of the zebra rib tree to be skipped. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-25pimd: Fix coverity checked return issueNathan Bahr1-7/+17
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>