diff options
author | glebius <glebius@FreeBSD.org> | 2014-01-27 09:33:30 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-01-27 09:33:30 +0000 |
commit | 6e1079d8b4ce99f62a4a236e45739c9b8d244fe2 (patch) | |
tree | 6457c0fa91b75f5ba8d250a0ac9e38be8fd4245e | |
parent | c3a529c9ca25ce9bf60844fd55d7668812f638e4 (diff) | |
download | FreeBSD-src-6e1079d8b4ce99f62a4a236e45739c9b8d244fe2.zip FreeBSD-src-6e1079d8b4ce99f62a4a236e45739c9b8d244fe2.tar.gz |
Merge 261024: fix PIM input regression.
-rw-r--r-- | sys/netinet/ip_mroute.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 3a03def..8be891b 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -2556,14 +2556,13 @@ pim_encapcheck(const struct mbuf *m, int off, int proto, void *arg) * is passed to if_simloop(). */ void -pim_input(struct mbuf *m, int off) +pim_input(struct mbuf *m, int iphlen) { struct ip *ip = mtod(m, struct ip *); struct pim *pim; int minlen; - int datalen = ntohs(ip->ip_len); + int datalen = ntohs(ip->ip_len) - iphlen; int ip_tos; - int iphlen = off; /* Keep statistics */ PIMSTAT_INC(pims_rcv_total_msgs); @@ -2593,8 +2592,7 @@ pim_input(struct mbuf *m, int off) * Get the IP and PIM headers in contiguous memory, and * possibly the PIM REGISTER header. */ - if ((m->m_flags & M_EXT || m->m_len < minlen) && - (m = m_pullup(m, minlen)) == 0) { + if (m->m_len < minlen && (m = m_pullup(m, minlen)) == 0) { CTR1(KTR_IPMF, "%s: m_pullup() failed", __func__); return; } |