summaryrefslogtreecommitdiffstats
path: root/pimd/pim_igmpv2.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: 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>
* pimd, pim6d: Changing IGMP to GM in debug macros.Abhishek N R2022-09-141-1/+1
| | | | | | | | | | | Changed PIM_DEBUG_IGMP_TRACE to PIM_DEBUG_GM_TRACE and PIM_DEBUG_IGMP_TRACE_DETAIL to PIM_DEBUG_GM_TRACE_DETAIL. Hence, these macros can be used for both v6 and v4. Issue: #11895 Co-authored-by: Sai Gomathi N <nsaigomathi@vmware.com> Signed-off-by: Abhishek N R <abnr@vmware.com>
* pimd,pim6d: Modifying IGMP to GM in PIM_DEBUG_IGMP_PACKETS to ↵Sai Gomathi N2022-09-051-6/+6
| | | | | | | | | PIM_DEBUG_GM_PACKETS 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>
* 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>
* pimd: un-dependency-hell `pim_instance.h`David Lamparter2022-05-061-0/+1
| | | | | | | 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: fix igmp query packetron2022-03-161-1/+2
| | | | | | 'Max Resp Time' in v2 query needs no encode (RFC 2236: 2.2.). Signed-off-by: ron <lyq140hf2006@163.com>
* Merge pull request #10012 from AbhishekNR/upstreamDonald Sharp2022-03-151-0/+21
|\ | | | | pimd : Handling of Exclude mode IGMPv3 report messages for SSM aware group.
| * pimd : Handling of IGMPv2 report message for SSM aware group range.Abhishek N R2022-01-201-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem Statement: ================== (rcv1)-----A----B---C v3 enabled with src 90.0.0.1 | (rcv2)-- v2 enable with src none rcv1 sends the packet in INCLUDE mode, rcv2 sends the IGMPv2 report and PIM convers this report into exclude mode. As per the state machine the group structure was getting added and deleted. As group gets deleted the mroute for 90.0.0.1 and recreated back. This effects the end to end trafiic. Root Cause Analysis: ==================== As per state machine INCLUDE (A) IS_EX (B) EXCLUDE (A*B,B-A) (B-A)=0 Delete (A-B) Group Timer=GMI EXCLUDE (X,Y) TO_EX (A) EXCLUDE (A-Y,Y*A) (A-X-Y)=Group Timer Delete (X-A) Delete (Y-A) Send Q(G,A-Y) Group Timer=GMI The above equations were getiing calulated for IP address 90.0.0.1 and 0.0.0.0 This results in group creation deletion. Fix: ==== As per RFC 4604. drop the exclude mode, IGMP reports, if destnation group is SSM based. EXCLUDE mode does not apply to SSM addresses, and an SSM-aware router will ignore MODE_IS_EXCLUDE and CHANGE_TO_EXCLUDE_MODE requests in the SSM range, Signed-off-by: Abhishek N R <abnr@vmware.com> Signed-off-by: Vishal Dhingra <rac.vishaldhingra@gmail.com>
* | pimd: Add IGMP join sent/failed statisticsDonatas Abraitis2022-03-131-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` 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>
* pimd: IGMPv2 leave msg may be longer than 8 octetsMobashshera Rasool2022-01-131-4/+5
| | | | | | | | | | | | | | Fix the code as per RFC 2236 section 2.5: Note that IGMP messages may be longer than 8 octets, especially future backwards-compatible versions of IGMP. As long as the Type is one that is recognized, an IGMPv2 implementation MUST ignore anything past the first 8 octets while processing the packet. However, the IGMP checksum is always computed over the whole IP payload, not just over the first 8 octets. Fixes: #10331 Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* pimd: IGMPv2 report msg may be longer than 8 octetsMobashshera Rasool2022-01-131-4/+5
| | | | | | | | | | | | | | | | | | As per test case IGMP Conformance test case 5.6, report messages longer than 8 octets should be accepted to support future-backward compatibilty. Fix the code as per RFC 2236 section 2.5: Note that IGMP messages may be longer than 8 octets, especially future backwards-compatible versions of IGMP. As long as the Type is one that is recognized, an IGMPv2 implementation MUST ignore anything past the first 8 octets while processing the packet. However, the IGMP checksum is always computed over the whole IP payload, not just over the first 8 octets. Fixes: #10331 Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* pimd: Modifying struct igmp_sock to gm_sock for IPv6Sai Gomathi2021-12-031-2/+2
| | | | | | | | | Modifying name of struct igmp_sock to struct gm_sock, which is to be used by both IPv4 and IPv6(for both MLD and IGMP). 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 name of struct igmp_group to struct gm_group for IPv6.Sai Gomathi2021-12-031-1/+1
| | | | | | | | | Modifying name of struct igmp_group to struct gm_group, which is to be used by both IPv4 and IPv6(for both MLD and IGMP). 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: zassert => assertDavid Lamparter2021-04-231-1/+1
| | | | | | | No point in having pimd use zassert() while everything else uses plain assert(). Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: IGMP conformance 5.10 test case is failingMobashshera Rasool2020-12-241-3/+28
| | | | | | | | | | | Test case 5.10 sends leave message to unicast address, the leave packet is accepted and a query message is sent in response to this. No validation for address is present in the function Add check for addresses as per RFC. Leave messages are allowed only sent to either ALL-ROUTERS (224.0.0.2) or group address. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* pimd: checksum must be validated before accepting igmp packetsMobashshera Rasool2020-11-171-0/+14
| | | | | | | | | | | | | | Issue: When an IGMPv2 leave packet is received, it did not validate the checksum and hence the packet is accepted and group specific query is sent out in response to this. Due to this IGMP conformance test case 6.1 failed. https://github.com/FRRouting/frr/issues/6868 Fix: Validate the checksum for all IGMP packets Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* *: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__Donatas Abraitis2020-03-051-2/+2
| | | | | | Just keep the code cool. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* pimd: show ip igmp statistics commandMladen Sablic2018-05-041-0/+6
| | | | | | | Command showing IGMP Rx statistics, useful for analyzing IGMP activity on interfaces. Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
* pimd: mtrace only IGMP socketsMladen Sablic2018-03-081-0/+6
| | | | | | | | Feature of mtrace only IGMP sockets on pim sm and pim ssm interfaces. Modifed IGMP socket creation and show igmp interface command output. Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-147/+147
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-151-4/+3
| | | | | | | | | | | The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: Missing include causes compile failure on some bsd'sDonald Sharp2017-01-191-0/+2
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix uninitialized valueDonald Sharp2016-12-221-2/+0
| | | | | | | When handling a igmp request, fill in group address before we attempt to output debug information on it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: replace grp_str[100] with grp_str[INET_ADDRSTRLEN]Daniel Walton2016-12-221-7/+7
| | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* pimd: add support for IGMPv2Daniel Walton2016-12-221-0/+190
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Ticket: CM-7962