]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_igmpv2.c
Merge pull request #3359 from qlyoung/true-atomics
[mirror_frr.git] / pimd / pim_igmpv2.c
index efa36e618fa6530c8a5426a73c64e92cfb829783..19c37688130c523f4468dc7c488d5712668cfdf2 100644 (file)
@@ -111,6 +111,9 @@ int igmp_v2_recv_report(struct igmp_sock *igmp, struct in_addr from,
 
        on_trace(__PRETTY_FUNCTION__, igmp->interface, from);
 
+       if (igmp->mtrace_only)
+               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",
@@ -118,6 +121,9 @@ int igmp_v2_recv_report(struct igmp_sock *igmp, struct in_addr from,
                return -1;
        }
 
+       /* Collecting IGMP Rx stats */
+       igmp->rx_stats.report_v2++;
+
        memcpy(&group_addr, igmp_msg + 4, sizeof(struct in_addr));
 
        if (PIM_DEBUG_IGMP_PACKETS) {
@@ -154,6 +160,9 @@ int igmp_v2_recv_leave(struct igmp_sock *igmp, struct in_addr from,
 
        on_trace(__PRETTY_FUNCTION__, igmp->interface, from);
 
+       if (igmp->mtrace_only)
+               return 0;
+
        if (igmp_msg_len != IGMP_V12_MSG_SIZE) {
                zlog_warn(
                        "Recv IGMPv2 LEAVE from %s on %s: size=%d other than correct=%d",
@@ -161,6 +170,9 @@ int igmp_v2_recv_leave(struct igmp_sock *igmp, struct in_addr from,
                return -1;
        }
 
+       /* Collecting IGMP Rx stats */
+       igmp->rx_stats.leave_v2++;
+
        memcpy(&group_addr, igmp_msg + 4, sizeof(struct in_addr));
 
        if (PIM_DEBUG_IGMP_PACKETS) {