summaryrefslogtreecommitdiffstats
path: root/pimd/pim_iface.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* pimd: Convert boundary_oil_plist to struct prefix_listCorey Siltala2024-12-061-1/+1
| | | | | | 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-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: add proxy join/prune functionalityBarry A. Trent2024-09-231-2/+4
| | | | | | | 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, yang: add cli for igmp proxyBarry A. Trent2024-09-201-0/+1
| | | | Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
* pimd, yang: Implement igmp static-group commandNathan Bahr2024-08-151-0/+6
| | | | | | | | | | | | 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, pim6d: Move mld/igmp deletion code to a common apiMobashshera Rasool2023-06-071-0/+1
| | | | | | | | 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/+1
| | | | | | | | | 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>
* pim6d: Impelmenting "ipv6 mld join"Abhishek N R2023-04-031-4/+4
| | | | | | Fixes: #12014 Signed-off-by: Abhishek N R <abnr@vmware.com>
* *: Rename `struct thread` to `struct event`Donald Sharp2023-03-241-2/+2
| | | | | | | | | 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>
* *: 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>
* pim6d: Changing igmp_enable to gm_enable.Abhishek N R2022-06-271-1/+1
| | | | | | Modified variable name so that it can be reused in mld. Signed-off-by: Abhishek N R <abnr@vmware.com>
* Merge pull request #10775 from opensourcerouting/pim6-mld-prDonald Sharp2022-05-171-0/+5
|\ | | | | pim6d: MLD code
| * pim6d: add fresh MLD implementationDavid Lamparter2022-05-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | pimd: un-dependency-hell `pim_instance.h`David Lamparter2022-05-061-1/+0
|/ | | | | | | This is causing build issues on BSD by including (transitively) `linux/mroute6.h` - try to address by disentangling the headers a bunch. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: remove pim_interface->optionsDavid Lamparter2022-04-081-1/+0
| | | | | | | | I should've removed this in #10960. It's a hazard in terms of forgetting to adjust PRs/other changes that might accidentally still reference the field. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: remove useless PIM_IF_* macrosDavid Lamparter2022-04-041-23/+5
| | | | | | | | | | | | The only function these macros have is to make the code confusing. "PIM_IF_DO_PIM" sounds like it triggers some action, but it doesn't. Replace with "bool" fields in struct pim_interface. (Note: PIM_IF_*_IGMP_LISTEN_ALLROUTERS was always set, without any way to unset it. It is completely removed now and always enabled.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: Add additional IGMP stats (peak number of groups)Donatas Abraitis2022-03-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` exit1-debian-11# sh ip igmp statistics interface eth2 IGMP statistics Interface : eth2 V1 query : 0 V2 query : 0 V3 query : 25 V2 leave : 0 V1 report : 0 V2 report : 0 V3 report : 34 mtrace response : 0 mtrace request : 0 unsupported : 0 joins failed : 0 joins sent : 13 general queries sent : 2 group queries sent : 24 peak groups : 9 total groups : 4 total source groups : 1 exit1-debian-11# sh ip igmp statistics interface eth2 json { "eth2":{ "name":"eth2", "queryV1":0, "queryV2":0, "queryV3":25, "leaveV2":0, "reportV1":0, "reportV2":0, "reportV3":34, "mtraceResponse":0, "mtraceRequest":0, "unsupported":0, "peakGroups":9, "totalGroups":4, "totalSourceGroups":1, "joinsFailed":0, "joinsSent":13, "generalQueriesSent":2, "groupQueriesSent":24 } } ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* pimd: Add IGMP join sent/failed statisticsDonatas Abraitis2022-03-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` exit1-debian-11# sh ip igmp statistics IGMP statistics Interface : global V1 query : 0 V2 query : 0 V3 query : 0 V2 leave : 0 V1 report : 0 V2 report : 0 V3 report : 16 mtrace response : 0 mtrace request : 0 unsupported : 0 joins failed : 0 joins sent : 11 total groups : 4 total source groups : 0 exit1-debian-11# sh ip igmp statistics json { "global":{ "name":"global", "queryV1":0, "queryV2":0, "queryV3":0, "leaveV3":0, "reportV1":0, "reportV2":0, "reportV3":16, "mtraceResponse":0, "mtraceRequest":0, "unsupported":0, "totalGroups":4, "totalSourceGroups":0, "joinsFailed":0, "joinsSent":11 } } ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* pim6d: rework interface address tracking/selectionDavid Lamparter2022-03-121-0/+7
| | | | | | | We only care about link-local addresses for IPv6 operation. Also, MLD needs the lowest while PIM needs the highest... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pim6d: IPv6-adjust iface primary/DR addrsDavid Lamparter2022-02-141-3/+3
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pim6d: IPv6-adjust neigh->source_addrDavid Lamparter2022-02-141-4/+2
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pim6d: convert address comparison in I_am_DR macroDavid Lamparter2022-02-141-1/+2
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: move iface lib initialization to a proper placeIgor Ryzhov2022-01-241-4/+1
| | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* pimd: Modifying members of pim_interface to accommodate IPv6 changesSai Gomathi2022-01-111-20/+23
| | | | | | | | | | | Modifying the members of pim_interface which are to be used for both IPv4 and IPv6 to common names(for both MLD and IGMP). Issues: #10023 Co-authored-by: Mobashshera Rasool <mrasool@vmware.com> Co-authored-by: Sarita Patra <saritap@vmware.com> Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
* pimd: Modifying in_addr to pim_addr in struct pim_iface_upstream_switchsarita patra2022-01-111-1/+2
| | | | | | | | | Changed struct in_addr address to struct pim_addr in struct pim_iface_upstream_switch which is to be used in both IPv4 and IPv6(Both MLD and IGMP). Reviewed-by: Mobashshera Rasool <mrasool@vmware.com> Signed-off-by: sarita patra <saritap@vmware.com>
* pimd: Modifying in_addr to pim_addr in struct pim_interface for IPv6Mobashshera Rasool2022-01-111-9/+7
| | | | | | | Based on compiler option, pim_addr will be changed to in_addr or in6_addr for pimd and pim6d respectively. Reviewed-by: Sarita Patra <saritap@vmware.com> Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* Revert "pimd: Modifying members of pim_interface to accommodate IPv6 changes"David Lamparter2021-12-141-10/+10
|
* pimd: Modifying members of pim_interface to accommodate IPv6 changesSai Gomathi2021-12-031-10/+10
| | | | | | | | | | Modifying the members of pim_interface which are to be used for both IPv4 and IPv6 to common names(for both MLD and IGMP). Issue: #10023 Co-authored-by: Mobashshera Rasool <mrasool@vmware.com> Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
* Merge pull request #9708 from mobash-rasool/new_bDonald Sharp2021-12-021-0/+15
|\ | | | | pimd: hello sent stats counter change and new flag addition to decide hello send
| * pimd: Add a flag to decide PIM has to send HelloMobashshera Rasool2021-10-041-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem Statement: ================== pim maintains two counters hello tx and hello rx at interface level. At present pim needs to send the hello message prior to other pim message as per RFC. This logic is getting derived from the tx hello counters. So when a new neighbor is added, tx counters are set to zero and then based on this, it is further decided to send hello in pim_hello_require function. Fix: ==== Separating the hello statistics and the logic to decide when to send hello based on a new flag. pim_ifstat_hello_sent will be used to note down the hello stats while a new flag is added to decide whether to send hello or not if it is the first packet to a neighbor. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* | pimd: removing no caller functionsSai Gomathi2021-11-261-1/+0
|/ | | | | | | Removing the no caller function declarations and definitions in pimd directory. Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
* pimd: IGMP memberships are not querier specificDavid Lamparter2021-08-271-0/+2
| | | | | | | | | | | | IGMP group/source memberships are a property of the interface; the particular IP address that the querier used to collect the data is irrelevant. ... and IGMP packets get delivered only once to pimd anyway, since we receive them on the "global" per-VRF IGMP socket. (The one in igmp_sock is only used for sending queries.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: de-circularize includesDavid Lamparter2021-08-271-0/+1
| | | | | | | pimd's include files are very interdependent. Let's chop that down a bit to gain some flexibility. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: support BFD profiles configurationRafael Zalamena2021-04-231-0/+1
| | | | | | Allow users to pre configure BFD sessions with a profile. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* pimd: rework BFD integrationRafael Zalamena2021-04-231-1/+7
| | | | | | Rewrite the BFD integration code to use the new library. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* *: Replace typo (supress => suppress)Donatas Abraitis2020-11-171-4/+7
| | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* pimd: fix IGMP receive handlingNathan Bahr2020-08-261-1/+1
| | | | | | | | | | | IGMP packets received from a source that does not match the subnet of any configured addresses on the receive interface should be ignored. Also, find and use the correct IGMP socket object for the received IGMP packet. Signed-off-by: Nathan Bahr <nbahr@atcorp.com> Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
* pimd: When DR becomes non DR, couldreg state events not handled.saravanank2020-03-201-0/+1
| | | | | | | | | | | RCA: Upstreams which are in register state other than noinfo, doesnt remove register tunnel from oif after it becomes nonDR Fix: scan upstreams with iif as the old dr and check if couldReg becomes false. If couldreg becomes false from true, remove regiface and stop reg timer. Do not disturb the entry. Later the entry shall be removed by kat expiry. Signed-off-by: Saravanan K <saravanank@vmware.com>
* pimd: Use PIM EVPN MLAG Infra for syncing PIM MLAG EntriesSatheesh Kumar K2020-03-061-0/+1
| | | | | | | | | | | Initially, MLAG Sync is happened at pim_ifchannel, this is mainly to support even config mismatches(missing configuration of dual active). But this causes more syncs for each entry. and also it is not In-line with PIM EVPN. to avoid that moving to pm_upstream based syncing. Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
* *: Add infrastructure to support zapi interface callbacksDonald Sharp2019-09-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Start the conversion to allow zapi interface callbacks to be controlled like vrf creation/destruction/change callbacks. This will allow us to consolidate control into the interface.c instead of having each daemon read the stream and react accordingly. This will hopefully reduce a bunch of cut-n-paste stuff Create 4 new callback functions that will be controlled by lib/if.c create -> A upper level protocol receives an interface creation event The ifp is brand spanking newly created in the system. up -> A upper level protocol receives a interface up event This means the interface is up and ready to go. down -> A upper level protocol receives a interface down destroy -> A upper level protocol receives a destroy event This means to delete the pointers associated with it. At this point this is just boilerplate setup for future commits. There is no new functionality. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #4369 from patrasar/lmqc_lmqtDonald Sharp2019-05-311-2/+8
|\ | | | | pimd: new cli to configure last-member-query-count & last-member-quer…
| * pimd: new cli to configure last-member-query-count & last-member-query-intervalSarita Patra2019-05-301-2/+8
| | | | | | | | | | | | | | | | | | Introduce new cli commands ip igmp last-member-query-count <1-7> ip igmp last-member-query-interval <1-255> deciseconds. Display the config in show running config and show ip igmp interface Signed-off-by: Sarita Patra <saritap@vmware.com>
* | pimd: Datastructure for BSM interface configuration and statisticssaravanank2019-05-151-0/+7
|/ | | | Signed-off-by: Saravanan K <saravanank@vmware.com>
* pimd: API for enabling pim on the vxlan term device ipmr-loAnuradha Karuppiah2019-04-201-2/+2
| | | | | | | | | | | | | | ipmr-lo is a dummy netdev with no additional addressing requirements - root@TORS1:~# ip -d link show ipmr-lo 28: ipmr-lo: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default link/ether 12:5a:ae:74:51:a2 brd ff:ff:ff:ff:ff:ff promiscuity 0 dummy addrgenmode eui64 root@TORS1:~# This device is used by pim-vxlan to signify multicast-vxlan-tunnel termination. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
* pimd: Add hidden 'ip pim active-active` commandDonald Sharp2019-01-311-0/+3
| | | | | | | | Add a command to track if an interface should be in active-active mode or not. This command is hidden at this time because it is not finished fully. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: use bool instead of int to pass true/falseDonald Sharp2018-09-171-1/+1
| | | | | | | | In pim_if_new use bool instead of an int to pass true/false values for what we should create the pim interface type for. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Actually create vif's in non-integrated configDonald Sharp2018-09-171-2/+3
| | | | | | | | | | | The startup of a non-integrated config was not properly allowing for startup to create the vif when we have not learned about the interface we are trying to configure at this point in time. Actually notice when we are trying to create a pimreg device or not to properly notice when to attempt to create the vif or not. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* zebra: if multiple connecteds, select loopback or vrf if presentDon Slice2018-08-231-2/+0
| | | | Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
* pimd: Remove expensive lookup for if a device is a vrf deviceDonald Sharp2018-04-301-1/+1
| | | | | | | Interfaces know if they are a vrf device or not and this data is passed up to the protocol. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>