summaryrefslogtreecommitdiffstats
path: root/pimd/pim_iface.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* pimd: Refactor pim NHTNathan Bahr2024-12-131-21/+8
| | | | | | | | Refactor the next hop tracking in PIM to fully support the configured RPF lookup mode. Moved many NHT related functions to pim_nht.h/c NHT now tracks both MRIB and URIB tables and makes nexthop decisions based on the configured lookup mode. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
* pimd: Convert boundary_oil_plist to struct prefix_listCorey Siltala2024-12-061-1/+0
| | | | | | Rather than storing the prefix-list name and looking it up every time we use it, store a pointer to the prefix-list itself. Signed-off-by: Corey Siltala <csiltala@atcorp.com>
* pimd,yang: Extend multicast boundary functionalityCorey Siltala2024-12-061-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new interface command ip multicast boundary ACCESSLIST4_NAME. This allows filtering on both source and group using the extended access-list syntax vs. group-only as with the existing "ip multicast boundary oil" command, which uses prefix-lists. If both are configured, the prefix- list is evaluated first. The default behavior for both prefix-lists and access-lists remains "deny", so the prefix-list must have a terminating "permit" statement in order to also evaluate against the access-list. The following example denies groups in range 229.1.1.0/24 and groups in range 232.1.1.0/24 with source 10.0.20.2: ! ip prefix-list pim-oil-plist seq 10 deny 229.1.1.0/24 ip prefix-list pim-oil-plist seq 20 permit any ! access-list pim-acl seq 10 deny ip host 10.0.20.2 232.1.1.0 0.0.0.255 access-list pim-acl seq 20 permit ip any any ! interface r1-eth0 ip address 10.0.20.1/24 ip igmp ip pim ip multicast boundary oil pim-oil-plist ip multicast boundary pim-acl ! Signed-off-by: Corey Siltala <csiltala@atcorp.com>
* pimd: free igmp proxy joins on interface deletionBarry A. Trent2024-12-041-2/+1
| | | | Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
* pimd: fix missing IPV4 checkanlan_cs2024-09-301-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>
* pimd: Add AutoRP functionality to PIMDNathan Bahr2024-09-241-0/+15
| | | | | | | | | | Perform AutoRP discovery and candidate RP announcements using the AutoRP protocol. Mapping agent is not yet implemented, but this feature is not necessary for FRR to support AutoRP as we only need one AutoRP mapping agent in the network. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
* pimd: add proxy join/prune functionalityBarry A. Trent2024-09-231-5/+74
| | | | | | | Use existing igmp static join infrastructure. Add an enum to distinguish static from proxy joins. Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
* pimd: Candidate-RP supportJafar Al-Gharaibeh2024-09-091-0/+3
| | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
* Merge pull request #16450 from nabahr/static_joinsDonald Sharp2024-08-221-4/+162
|\ | | | | PIM: Implement static IGMP joins without an IGMP report
| * pimd, yang: Implement igmp static-group commandNathan Bahr2024-08-151-4/+162
| | | | | | | | | | | | | | | | | | | | | | | | This will add a static IGMP group that does not rely on an underlying socket join which sends traffic to the cpu unneccesarily. Instead, the groups are joined directly without any IGMP interactions. New command is under interfaces, 'ip igmp static-group ...'. Added an alias for 'ip igmp join ...' to 'ip igmp join-group'. Moved IGMP join groups to new yang list "join-group" and reused the "static-group" list for the IGMP static groups. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
* | pimd: fix missing checking the return value for igmp commandanlan_cs2024-08-161-1/+4
|/ | | | | | | `gm_join_new()` will return NULL in the case of running out of socket/file resources. Just add the check for it. Signed-off-by: anlan_cs <anlan_cs@tom.com>
* Merge pull request #13627 from anlancs/pimd/pimreg-vrf-add-breakmobash-rasool2024-04-101-0/+2
|\ | | | | pimd: Set pimreg interface with one master
| * pimd: Set pimreg interface with one masteranlan_cs2023-05-301-0/+2
| | | | | | | | | | | | Add break for loop, `pimreg` interface should be with one master. Signed-off-by: anlan_cs <vic.lan@pica8.com>
* | *: convert `struct interface->connected` to DLISTDavid Lamparter2023-11-221-17/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace `struct list *` with `DLIST(if_connected, ...)`. NB: while converting this, I found multiple places using connected prefixes assuming they were IPv4 without checking: - vrrpd/vrrp.c: vrrp_socket() - zebra/irdp_interface.c: irdp_get_prefix(), irdp_if_start(), irdp_advert_off() (these fixes are really hard to split off into separate commits as that would require going back and reapplying the change but with the old list handling) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: Let's use the native IFNAMSIZ instead of INTERFACE_NAMSIZDonald Sharp2023-11-211-1/+1
| | | | | | | | | | | | | | | | INTERFACE_NAMSIZ is just a redefine of IFNAMSIZ and IFNAMSIZ is the standard for interface name length on all platforms that FRR currently compiles on. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | lib: convert if_zapi_callbacks into actual hooksDavid Lamparter2023-11-031-2/+4
| | | | | | | | | | | | | | | | | | ...so that multiple functions can be subscribed. The create/destroy hooks are renamed to real/unreal because that's what they *actually* signal. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | Merge pull request #13617 from anlancs/fix/pimd-remove-pimreg-vrfbase_9.1mobash-rasool2023-10-101-3/+10
|\ \ | | | | | | pimd: Fix missing pimreg interface
| * | pimd: Fix missing pimreg interfaceanlan_cs2023-05-301-3/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `pimregX` of specific vrf can be deleted from kernel after this vrf is deleted. However, then `pimdregX` will never come back to kernel after adding it ( the same vrf ) back. That is to say, it exists only in daemon, but not in kernel. The root cause is this `pimregX` is not really deleted for its special usage, and `pim_if_create_pimreg()` wants reusing it. I have tried 4 solutions: 1. Remove the `configured` flag of `pimregX`, allow its deletion. A few timers still use `pimregX` after its deletion. So, not adopted. 2. Remove `pimregX` by vrf hook in `pim_instance_terminate()`. It has no vrf id there. So, not adopted. 3. Reuse `pimregX` in `pim_if_create_pimreg()`. If `pim->regiface->info` is true, then reuse old `pimregX` and only call `pim_if_add_vif()` to install it into kernel. But at that time, it maybe is in default VRF. The `pim_zebra_interface_set_master()` doesn't work at that time because it shouldn't wait there for its changing into correct VRF. So, not adopted. 4. Not reuse it. If `pim->regiface->info` is true, there must have been pim instance with VRF deleted and created before. Actually delele old one in `pim_if_create_pimreg()`, then recreate new one. Finally, this PR adopted the fourth solution. Fixes #13454 Signed-off-by: anlan_cs <vic.lan@pica8.com>
* | Merge pull request #13605 from anlancs/fix/pimd-promote-interfaceDonald Sharp2023-07-201-2/+12
|\ \ | | | | | | pimd: Fix missing promotion for primary address
| * | pimd: Fix missing promotion for primary addressanlan_cs2023-05-261-2/+12
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Assume that `pim_ifp` has two ip (v4) addresses, one is primary, the other is secondary. After remove primary ip, the secondary ip doesn't be promoted, so `pim_ifp->primary_address` will wrongly be set to "0.0.0.0", it leads to `pim_sock_delete(ifp)` on this interface. Add the promotion for primary address. Fixed #13590 Signed-off-by: anlan_cs <vic.lan@pica8.com>
* | pimd: Fix memory leak in PIM interface deletionKeelan102023-06-271-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit ensures proper cleanup by deleting the gm_join_list when a PIM interface is deleted. The gm_join_list was previously not being freed, causing a memory leak. The ASan leak log for reference: ``` *********************************************************************************** Address Sanitizer Error detected in multicast_mld_join_topo1.test_multicast_mld_local_join/r1.asan.pim6d.28070 ================================================================= ==28070==ERROR: LeakSanitizer: detected memory leaks Direct leak of 40 byte(s) in 1 object(s) allocated from: #0 0x7f3605dbfd28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28) #1 0x56230373dd6b in qcalloc lib/memory.c:105 #2 0x56230372180f in list_new lib/linklist.c:49 #3 0x56230361b589 in pim_if_gm_join_add pimd/pim_iface.c:1313 #4 0x562303642247 in lib_interface_gmp_address_family_static_group_create pimd/pim_nb_config.c:2868 #5 0x562303767280 in nb_callback_create lib/northbound.c:1235 #6 0x562303767280 in nb_callback_configuration lib/northbound.c:1579 #7 0x562303768a1d in nb_transaction_process lib/northbound.c:1710 #8 0x56230376904a in nb_candidate_commit_apply lib/northbound.c:1104 #9 0x5623037692ba in nb_candidate_commit lib/northbound.c:1137 #10 0x562303769dec in nb_cli_classic_commit lib/northbound_cli.c:49 #11 0x56230376fb79 in nb_cli_pending_commit_check lib/northbound_cli.c:88 #12 0x5623036c5bcb in cmd_execute_command_real lib/command.c:991 #13 0x5623036c5f1b in cmd_execute_command lib/command.c:1053 #14 0x5623036c6392 in cmd_execute lib/command.c:1221 #15 0x5623037e75da in vty_command lib/vty.c:591 #16 0x5623037e7a74 in vty_execute lib/vty.c:1354 #17 0x5623037f0253 in vtysh_read lib/vty.c:2362 #18 0x5623037db4e8 in event_call lib/event.c:1995 #19 0x562303720f97 in frr_run lib/libfrr.c:1213 #20 0x56230368615d in main pimd/pim6_main.c:184 #21 0x7f360461bc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) Indirect leak of 192 byte(s) in 4 object(s) allocated from: #0 0x7f3605dbfd28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28) #1 0x56230373dd6b in qcalloc lib/memory.c:105 #2 0x56230361b91d in gm_join_new pimd/pim_iface.c:1288 #3 0x56230361b91d in pim_if_gm_join_add pimd/pim_iface.c:1326 #4 0x562303642247 in lib_interface_gmp_address_family_static_group_create pimd/pim_nb_config.c:2868 #5 0x562303767280 in nb_callback_create lib/northbound.c:1235 #6 0x562303767280 in nb_callback_configuration lib/northbound.c:1579 #7 0x562303768a1d in nb_transaction_process lib/northbound.c:1710 #8 0x56230376904a in nb_candidate_commit_apply lib/northbound.c:1104 #9 0x5623037692ba in nb_candidate_commit lib/northbound.c:1137 #10 0x562303769dec in nb_cli_classic_commit lib/northbound_cli.c:49 #11 0x56230376fb79 in nb_cli_pending_commit_check lib/northbound_cli.c:88 #12 0x5623036c5bcb in cmd_execute_command_real lib/command.c:991 #13 0x5623036c5f1b in cmd_execute_command lib/command.c:1053 #14 0x5623036c6392 in cmd_execute lib/command.c:1221 #15 0x5623037e75da in vty_command lib/vty.c:591 #16 0x5623037e7a74 in vty_execute lib/vty.c:1354 #17 0x5623037f0253 in vtysh_read lib/vty.c:2362 #18 0x5623037db4e8 in event_call lib/event.c:1995 #19 0x562303720f97 in frr_run lib/libfrr.c:1213 #20 0x56230368615d in main pimd/pim6_main.c:184 #21 0x7f360461bc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) Indirect leak of 96 byte(s) in 4 object(s) allocated from: #0 0x7f3605dbfd28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28) #1 0x56230373dd6b in qcalloc lib/memory.c:105 #2 0x562303721651 in listnode_new lib/linklist.c:71 #3 0x56230372182b in listnode_add lib/linklist.c:92 #4 0x56230361ba9a in gm_join_new pimd/pim_iface.c:1295 #5 0x56230361ba9a in pim_if_gm_join_add pimd/pim_iface.c:1326 #6 0x562303642247 in lib_interface_gmp_address_family_static_group_create pimd/pim_nb_config.c:2868 #7 0x562303767280 in nb_callback_create lib/northbound.c:1235 #8 0x562303767280 in nb_callback_configuration lib/northbound.c:1579 #9 0x562303768a1d in nb_transaction_process lib/northbound.c:1710 #10 0x56230376904a in nb_candidate_commit_apply lib/northbound.c:1104 #11 0x5623037692ba in nb_candidate_commit lib/northbound.c:1137 #12 0x562303769dec in nb_cli_classic_commit lib/northbound_cli.c:49 #13 0x56230376fb79 in nb_cli_pending_commit_check lib/northbound_cli.c:88 #14 0x5623036c5bcb in cmd_execute_command_real lib/command.c:991 #15 0x5623036c5f1b in cmd_execute_command lib/command.c:1053 #16 0x5623036c6392 in cmd_execute lib/command.c:1221 #17 0x5623037e75da in vty_command lib/vty.c:591 #18 0x5623037e7a74 in vty_execute lib/vty.c:1354 #19 0x5623037f0253 in vtysh_read lib/vty.c:2362 #20 0x5623037db4e8 in event_call lib/event.c:1995 #21 0x562303720f97 in frr_run lib/libfrr.c:1213 #22 0x56230368615d in main pimd/pim6_main.c:184 #23 0x7f360461bc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) Indirect leak of 48 byte(s) in 1 object(s) allocated from: #0 0x7f3605dbfd28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28) #1 0x56230373dd6b in qcalloc lib/memory.c:105 #2 0x56230361b91d in gm_join_new pimd/pim_iface.c:1288 #3 0x56230361b91d in pim_if_gm_join_add pimd/pim_iface.c:1326 #4 0x562303642247 in lib_interface_gmp_address_family_static_group_create pimd/pim_nb_config.c:2868 #5 0x562303767280 in nb_callback_create lib/northbound.c:1235 #6 0x562303767280 in nb_callback_configuration lib/northbound.c:1579 #7 0x562303768a1d in nb_transaction_process lib/northbound.c:1710 #8 0x56230376904a in nb_candidate_commit_apply lib/northbound.c:1104 #9 0x5623037692ba in nb_candidate_commit lib/northbound.c:1137 #10 0x562303769dec in nb_cli_classic_commit lib/northbound_cli.c:49 #11 0x56230376fb79 in nb_cli_pending_commit_check lib/northbound_cli.c:88 #12 0x5623036c5bcb in cmd_execute_command_real lib/command.c:991 #13 0x5623036c5f6f in cmd_execute_command lib/command.c:1072 #14 0x5623036c6392 in cmd_execute lib/command.c:1221 #15 0x5623037e75da in vty_command lib/vty.c:591 #16 0x5623037e7a74 in vty_execute lib/vty.c:1354 #17 0x5623037f0253 in vtysh_read lib/vty.c:2362 #18 0x5623037db4e8 in event_call lib/event.c:1995 #19 0x562303720f97 in frr_run lib/libfrr.c:1213 #20 0x56230368615d in main pimd/pim6_main.c:184 #21 0x7f360461bc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) Indirect leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7f3605dbfd28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28) #1 0x56230373dd6b in qcalloc lib/memory.c:105 #2 0x562303721651 in listnode_new lib/linklist.c:71 #3 0x56230372182b in listnode_add lib/linklist.c:92 #4 0x56230361ba9a in gm_join_new pimd/pim_iface.c:1295 #5 0x56230361ba9a in pim_if_gm_join_add pimd/pim_iface.c:1326 #6 0x562303642247 in lib_interface_gmp_address_family_static_group_create pimd/pim_nb_config.c:2868 #7 0x562303767280 in nb_callback_create lib/northbound.c:1235 #8 0x562303767280 in nb_callback_configuration lib/northbound.c:1579 #9 0x562303768a1d in nb_transaction_process lib/northbound.c:1710 #10 0x56230376904a in nb_candidate_commit_apply lib/northbound.c:1104 #11 0x5623037692ba in nb_candidate_commit lib/northbound.c:1137 #12 0x562303769dec in nb_cli_classic_commit lib/northbound_cli.c:49 #13 0x56230376fb79 in nb_cli_pending_commit_check lib/northbound_cli.c:88 #14 0x5623036c5bcb in cmd_execute_command_real lib/command.c:991 #15 0x5623036c5f6f in cmd_execute_command lib/command.c:1072 #16 0x5623036c6392 in cmd_execute lib/command.c:1221 #17 0x5623037e75da in vty_command lib/vty.c:591 #18 0x5623037e7a74 in vty_execute lib/vty.c:1354 #19 0x5623037f0253 in vtysh_read lib/vty.c:2362 #20 0x5623037db4e8 in event_call lib/event.c:1995 #21 0x562303720f97 in frr_run lib/libfrr.c:1213 #22 0x56230368615d in main pimd/pim6_main.c:184 #23 0x7f360461bc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) SUMMARY: AddressSanitizer: 400 byte(s) leaked in 11 allocation(s). *********************************************************************************** ``` Signed-off-by: Keelan Cannoo <keelan.cannoo@icloud.com>
* | pimd, pim6d: Move mld/igmp deletion code to a common apiMobashshera Rasool2023-06-071-0/+21
| | | | | | | | | | | | | | | | Move the mld/igmp deletion common code to api pim_gm_interface_delete code for IPv6 deletion(gm_ifp_teardown) for MLD was missing in this flow Making the code common fixes this too. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* | pimd, pim6d: Rename and move api pim_cmd_interface_deleteMobashshera Rasool2023-06-071-0/+24
| | | | | | | | | | | | | | | | | | Rename pim_cmd_interface_delete to pim_pim_interface_delete and move the api to pimd/pim_iface.c Changed the return type of the api from int to void. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* | pimd, pim6d: Move api pim_if_membership_clearMobashshera Rasool2023-06-071-0/+13
|/ | | | | | | | | | Move pim_if_membership_clear api from pimd/pim_nb_config.c to pimd/pim_iface.c Also fixed curly braces warning WARNING: braces {} are not necessary for single statement blocks 1773: FILE: /tmp/f1-127504/pim_iface.c:1773: Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* pimd: Use macro for pimreg interfaceanlan_cs2023-05-111-3/+3
| | | | | | | | | Some interfaces are special, they have the same `ifindex` with pimreg. Use macro for `ifindex` of pimreg. And adjust log. Signed-off-by: anlan_cs <vic.lan@pica8.com>
* pim6d: Impelmenting "ipv6 mld join"Abhishek N R2023-04-031-95/+50
| | | | | | Fixes: #12014 Signed-off-by: Abhishek N R <abnr@vmware.com>
* pim6d: Do not use interfaces with ifindex as 0Sai Gomathi N2023-03-201-0/+6
| | | | | | | | | | | | | | After restarting pim6d, in some cases the ifindex is 0 for the interfaces, so the vif index is also assigned as 0. This causes the interface name to be pim6reg. Fix: If the ifindex is 0 and the interface name is not "pimreg" or "pim6reg", the function will return without assigning vifindex with an error message. Issue: #12744 Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
* pimd: Prevent crash when pimreg already exists.Donald Sharp2023-03-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | If the pimreg device exists but it has not been set to the pim->pimreg pointer we can have a crash. Just prevent the crash since it's some sort of startup / re-org the network issue. (gdb) bt 0 0x00007f0485b035cb in raise () from /lib/x86_64-linux-gnu/libpthread.so.0 1 0x00007f0485c0fbec in core_handler (signo=6, siginfo=0x7ffdc0198030, context=<optimized out>) at lib/sigevent.c:264 2 <signal handler called> 3 0x00007f04859668eb in raise () from /lib/x86_64-linux-gnu/libc.so.6 4 0x00007f0485951535 in abort () from /lib/x86_64-linux-gnu/libc.so.6 5 0x00007f0485c3af76 in _zlog_assert_failed (xref=xref@entry=0x55692269b940 <_xref.23164>, extra=extra@entry=0x0) at lib/zlog.c:680 6 0x00005569226150d0 in pim_if_new (ifp=0x556922c82900, gm=gm@entry=false, pim=pim@entry=false, ispimreg=ispimreg@entry=true, is_vxlan_term=is_vxlan_term@entry=false) at pimd/pim_iface.c:124 7 0x0000556922615140 in pim_if_create_pimreg (pim=pim@entry=0x556922cc11e0) at pimd/pim_iface.c:1549 8 0x0000556922616bc8 in pim_if_create_pimreg (pim=0x556922cc11e0) at pimd/pim_iface.c:1613 9 pim_ifp_create (ifp=0x556922cc0e70) at pimd/pim_iface.c:1641 10 0x00007f0485c32cf9 in zclient_interface_add (cmd=<optimized out>, zclient=<optimized out>, length=<optimized out>, vrf_id=77) at lib/zclient.c:2214 11 0x00007f0485c3346a in zclient_read (thread=<optimized out>) at lib/zclient.c:4003 12 0x00007f0485c215ed in thread_call (thread=thread@entry=0x7ffdc0198880) at lib/thread.c:2008 13 0x00007f0485bdbbc8 in frr_run (master=0x556922a10470) at lib/libfrr.c:1223 14 0x000055692260312b in main (argc=<optimized out>, argv=0x7ffdc0198b98, envp=<optimized out>) at pimd/pim_main.c:176 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: auto-convert to SPDX License IDsDavid Lamparter2023-02-091-13/+1
| | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pim6d: Handle IPV6 for "no ipv6 pim"Sarita Patra2022-11-141-2/+2
| | | | | | Issue: #11931 Signed-off-by: Sarita Patra <saritap@vmware.com>
* Merge pull request #11872 from AbhishekNR/const_igmp_gmDonatas Abraitis2022-09-191-5/+5
|\ | | | | pimd, pim6d: Changing IGMP to GM in few macro's.
| * pimd, pim6d: Changing IGMP to GM in few macro's.Abhishek N R2022-09-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | Changing IGMP_DEFAULT_ROBUSTNESS_VARIABLE to GM_DEFAULT_ROBUSTNESS_VARIABLE, IGMP_GENERAL_QUERY_INTERVAL to GM_GENERAL_QUERY_INTERVAL, IGMP_QUERY_MAX_RESPONSE_TIME_DSEC to GM_QUERY_MAX_RESPONSE_TIME_DSEC and IGMP_SPECIFIC_QUERY_MAX_RESPONSE_TIME_DSEC to GM_SPECIFIC_QUERY_MAX_RESPONSE_TIME_DSEC to accomodate both igmp and mld. And moved it to common file. Signed-off-by: Abhishek N R <abnr@vmware.com>
* | pim6d: (*,G) mroutes not learnt after pim6d daemon restartAbhishek N R2022-09-161-1/+1
|/ | | | | | | | | | | | | | | After restart pim dr address was zero due to which pim (*,G) join could not get propagated towards RP. While trying to find primary address ll_highest will be zero initially, since we have not received address from zebra yet. So we can get the best address at this point and use it as primary address whenever ll_highest is zero. Fixes: #11925 Signed-off-by: Abhishek N R <abnr@vmware.com>
* pimd: Fix memleak in bfd profileMobashshera Rasool2022-09-141-0/+3
| | | | | | In function pim_if_delete, pim_ifp->bfd_config.profile needs to be freed. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* pimd,pim6d: Modifying IGMP to GM in PIM_DEBUG_IGMP_EVENTS to PIM_DEBUG_GM_EVENTSSai Gomathi N2022-09-051-1/+1
| | | | | | | Changing the macros to common so that it can be used for pimv6 debugs as well to be used for both IGMP and MLD debugs. Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
* Merge pull request #11485 from AbhishekNR/ipv6_mld_todoDonatas Abraitis2022-08-181-5/+3
|\ | | | | pim6d: Completing "ipv6 mld" config command.
| * pim6d: Completing "ipv6 mld" command.Abhishek N R2022-07-071-5/+3
| | | | | | | | Signed-off-by: Abhishek N R <abnr@vmware.com>
* | pimd: Simply the code a bit, reduce code complexityMobashshera Rasool2022-08-011-16/+7
| | | | | | | | | | | | | | Combine all the if conditions in api pim_if_addr_add_all to reduce nested loops. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* | pim6d: clear interface stats on interface shutdownMobashshera Rasool2022-07-181-2/+0
| | | | | | | | | | | | | | | | | | The clear was happening only for PIMv4. Removed the PIMv4 check. Fixes: #11628 Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* | pim6d: Handle rpf_addr in pim_if_addr_add()sarita patra2022-07-061-3/+1
|/ | | | Signed-off-by: sarita patra <saritap@vmware.com>
* pim6d: Changing igmp_enable to gm_enable.Abhishek N R2022-06-271-2/+2
| | | | | | Modified variable name so that it can be reused in mld. Signed-off-by: Abhishek N R <abnr@vmware.com>
* Merge pull request #11475 from patrasar/pim_if_deleteDonald Sharp2022-06-241-2/+2
|\ | | | | pimd: fix pim interface deletion flow
| * pimd: fix pim interface deletion flowSarita Patra2022-06-241-2/+2
| | | | | | | | | | | | | | | | | | | | Deletion of pim interface(pim_if_delete) should do the below things before cleanup. 1. Send a hello message with zero hold time. 2. Delete all the neighbors. 3. Close the pim socket. Signed-off-by: Sarita Patra <saritap@vmware.com>
* | Merge pull request #11355 from patrasar/pim6regDonald Sharp2022-06-151-3/+3
|\ \ | | | | | | pim6d: creating pim6reg
| * | pim6d: creating pim6reg interface for pim6dSarita Patra2022-06-151-3/+3
| |/ | | | | | | Signed-off-by: Sarita Patra <saritap@vmware.com>
* / pim6d: Don't enable mld on pimreg interfacesarita patra2022-05-231-1/+2
|/ | | | Signed-off-by: sarita patra <saritap@vmware.com>
* Merge pull request #10775 from opensourcerouting/pim6-mld-prDonald Sharp2022-05-171-2/+14
|\ | | | | pim6d: MLD code
| * pim6d: show MLD in running-configDavid Lamparter2022-05-061-0/+1
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * pim6d: add fresh MLD implementationDavid Lamparter2022-05-061-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | Fresh ground-up MLD implementation with subscriber-tracking for MLDv2. Intended to be adapted for IPv4 and replace the IGMP implementation at a later point. Tested in ANVL, currently at 94/116. Some issues/TODOs are left in the code as CPP_NOTICE markers, but the code is very much good enough to proceed since otherwise we're blocked on overall PIM v6 progress. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | pimd: introduced flags for pim_passive_enablesarita patra2022-05-131-0/+1
|/ | | | Signed-off-by: sarita patra <saritap@vmware.com>