From 6de0f6c8b8fedb729fb3bb119dd6e16d784ee477 Mon Sep 17 00:00:00 2001 From: Darren Reed Date: Thu, 16 Dec 2004 21:02:16 +0000 Subject: [PATCH] Using just m_pullup to get all of the interesting bits in packet into one buffer doesn't work for ipv6 packets, so use m_defrag() here instead as an easy drop-in replacement. PR: 70399 --- sys/contrib/ipfilter/netinet/fil.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c index 495163b31f2..e214fffd4df 100644 --- a/sys/contrib/ipfilter/netinet/fil.c +++ b/sys/contrib/ipfilter/netinet/fil.c @@ -2433,7 +2433,12 @@ void *ipin; ATOMIC_INCL(frstats[out].fr_pull[0]); qf->qf_data = MTOD(m, char *) + ipoff; # else - m = m_pullup(m, len); +# if (__FreeBSD_version >= 490000) + if ((len > MHLEN) && ((m->m_flags & M_PKTHDR) != 0)) + m = m_defrag(m, M_DONTWAIT); + else +# endif + m = m_pullup(m, len); *fin->fin_mp = m; if (m == NULL) { ATOMIC_INCL(frstats[out].fr_pull[1]);