]> git.proxmox.com Git - mirror_frr.git/commitdiff
pimd: IGMPv2 report msg may be longer than 8 octets
authorMobashshera Rasool <mrasool@vmware.com>
Thu, 13 Jan 2022 04:39:48 +0000 (20:39 -0800)
committerMobashshera Rasool <mrasool@vmware.com>
Thu, 13 Jan 2022 08:20:39 +0000 (00:20 -0800)
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/pim_igmpv2.c

index 2616afca69bb95d61d9024023896766b88f2694a..dc18e1593d62d0d085285554fc41c6e9a991c1f9 100644 (file)
@@ -115,10 +115,11 @@ int igmp_v2_recv_report(struct gm_sock *igmp, struct in_addr from,
                return 0;
 
        if (igmp_msg_len != IGMP_V12_MSG_SIZE) {
-               zlog_warn(
-                       "Recv IGMPv2 REPORT from %s on %s: size=%d other than correct=%d",
-                       from_str, ifp->name, igmp_msg_len, IGMP_V12_MSG_SIZE);
-               return -1;
+               if (PIM_DEBUG_IGMP_PACKETS)
+                       zlog_debug(
+                               "Recv IGMPv2 REPORT from %s on %s: size=%d other than correct=%d",
+                               from_str, ifp->name, igmp_msg_len,
+                               IGMP_V12_MSG_SIZE);
        }
 
        if (igmp_validate_checksum(igmp_msg, igmp_msg_len) == -1) {