diff options
Diffstat (limited to 'pimd/pim_igmpv2.c')
| -rw-r--r-- | pimd/pim_igmpv2.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pimd/pim_igmpv2.c b/pimd/pim_igmpv2.c index af598d040d..d836c66cbb 100644 --- a/pimd/pim_igmpv2.c +++ b/pimd/pim_igmpv2.c @@ -121,6 +121,13 @@ int igmp_v2_recv_report(struct igmp_sock *igmp, struct in_addr from, return -1; } + if (igmp_validate_checksum(igmp_msg, igmp_msg_len) == -1) { + zlog_warn( + "Recv IGMPv2 REPORT from %s on %s: size=%d with invalid checksum", + from_str, ifp->name, igmp_msg_len); + return -1; + } + /* Collecting IGMP Rx stats */ igmp->rx_stats.report_v2++; @@ -170,6 +177,13 @@ int igmp_v2_recv_leave(struct igmp_sock *igmp, struct in_addr from, return -1; } + if (igmp_validate_checksum(igmp_msg, igmp_msg_len) == -1) { + zlog_warn( + "Recv IGMPv2 LEAVE from %s on %s with invalid checksum", + from_str, ifp->name); + return -1; + } + /* Collecting IGMP Rx stats */ igmp->rx_stats.leave_v2++; |
