]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_igmpv2.c
Merge pull request #5494 from opensourcerouting/mlag-module
[mirror_frr.git] / pimd / pim_igmpv2.c
index 1d40bdcbfce6ceec24860381e687aaa429e0762a..19c37688130c523f4468dc7c488d5712668cfdf2 100644 (file)
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; see the file COPYING; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- * MA 02110-1301 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include "zebra.h"
@@ -112,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",
@@ -119,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) {
@@ -155,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",
@@ -162,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) {