svn commit: r261208 - stable/10/sys/netinet
Gleb Smirnoff
glebius at FreeBSD.org
Mon Jan 27 09:33:31 UTC 2014
Author: glebius
Date: Mon Jan 27 09:33:30 2014
New Revision: 261208
URL: http://svnweb.freebsd.org/changeset/base/261208
Log:
Merge 261024: fix PIM input regression.
Modified:
stable/10/sys/netinet/ip_mroute.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/netinet/ip_mroute.c
==============================================================================
--- stable/10/sys/netinet/ip_mroute.c Mon Jan 27 08:15:21 2014 (r261207)
+++ stable/10/sys/netinet/ip_mroute.c Mon Jan 27 09:33:30 2014 (r261208)
@@ -2556,14 +2556,13 @@ pim_encapcheck(const struct mbuf *m, int
* 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;
}
More information about the svn-src-all
mailing list