summaryrefslogtreecommitdiff
path: root/pimd/pim_igmpv2.c
AgeCommit message (Collapse)Author
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-09-13pimd, pim6d: Changing IGMP to GM in debug macros.Abhishek N R
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>
2022-09-04pimd,pim6d: Modifying IGMP to GM in PIM_DEBUG_IGMP_PACKETS to ↵Sai Gomathi N
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>
2022-09-04pimd,pim6d: Modifying IGMP to GM in PIM_DEBUG_IGMP_EVENTS to PIM_DEBUG_GM_EVENTSSai Gomathi N
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>
2022-05-06pimd: un-dependency-hell `pim_instance.h`David Lamparter
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>
2022-03-16pimd: fix igmp query packetron
'Max Resp Time' in v2 query needs no encode (RFC 2236: 2.2.). Signed-off-by: ron <lyq140hf2006@163.com>
2022-03-15Merge pull request #10012 from AbhishekNR/upstreamDonald Sharp
pimd : Handling of Exclude mode IGMPv3 report messages for SSM aware group.
2022-03-13pimd: Add IGMP join sent/failed statisticsDonatas Abraitis
``` 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>
2022-01-20pimd : Handling of IGMPv2 report message for SSM aware group range.Abhishek N R
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>
2022-01-13pimd: IGMPv2 leave msg may be longer than 8 octetsMobashshera Rasool
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>
2022-01-13pimd: IGMPv2 report msg may be longer than 8 octetsMobashshera Rasool
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>
2021-12-03pimd: Modifying struct igmp_sock to gm_sock for IPv6Sai Gomathi
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>
2021-12-03pimd: Modifying name of struct igmp_group to struct gm_group for IPv6.Sai Gomathi
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>
2021-04-23pimd: zassert => assertDavid Lamparter
No point in having pimd use zassert() while everything else uses plain assert(). Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-12-24pimd: IGMP conformance 5.10 test case is failingMobashshera Rasool
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>
2020-11-17pimd: checksum must be validated before accepting igmp packetsMobashshera Rasool
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>
2020-03-05*: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__Donatas Abraitis
Just keep the code cool. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2018-05-04pimd: show ip igmp statistics commandMladen Sablic
Command showing IGMP Rx statistics, useful for analyzing IGMP activity on interfaces. Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2018-03-08pimd: mtrace only IGMP socketsMladen Sablic
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>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-15*: make consistent & update GPLv2 file headersDavid Lamparter
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>
2017-01-19pimd: Missing include causes compile failure on some bsd'sDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Fix uninitialized valueDonald Sharp
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>
2016-12-21pimd: replace grp_str[100] with grp_str[INET_ADDRSTRLEN]Daniel Walton
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-12-21pimd: add support for IGMPv2Daniel Walton
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Ticket: CM-7962