summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/frag6.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index 38631a8159a..5e8721f15e2 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frag6.c,v 1.83 2018/08/22 19:48:48 cheloha Exp $ */
+/* $OpenBSD: frag6.c,v 1.84 2018/09/10 12:47:02 bluhm Exp $ */
/* $KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $ */
/*
@@ -400,6 +400,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto, int af)
t = t->m_next;
t->m_next = af6->ip6af_m;
m_adj(t->m_next, af6->ip6af_offset);
+ m_removehdr(t->m_next);
pool_put(&ip6af_pool, af6);
}
@@ -430,8 +431,10 @@ frag6_input(struct mbuf **mp, int *offp, int proto, int af)
pool_put(&ip6q_pool, q6);
- if (m->m_flags & M_PKTHDR) { /* Isn't it always true? */
+ {
int plen = 0;
+
+ KASSERT(m->m_flags & M_PKTHDR);
for (t = m; t; t = t->m_next)
plen += t->m_len;
m->m_pkthdr.len = plen;