summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/mrouted/igmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/mrouted/igmp.c b/usr.sbin/mrouted/igmp.c
index 6ae59323cf8..2f16c1f6ba1 100644
--- a/usr.sbin/mrouted/igmp.c
+++ b/usr.sbin/mrouted/igmp.c
@@ -150,7 +150,7 @@ accept_igmp(int recvlen)
}
iphdrlen = ip->ip_hl << 2;
- ipdatalen = ntohs(ip->ip_len);
+ ipdatalen = ntohs(ip->ip_len) - iphdrlen;
if (iphdrlen + ipdatalen != recvlen) {
logit(LOG_WARNING, 0,
"received packet from %s shorter (%u bytes) than hdr+data length (%u+%u)",