summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ah_input.c
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-11-15 06:18:09 +0000
committerume <ume@FreeBSD.org>2003-11-15 06:18:09 +0000
commit6e230b39ea0471b16153d228f9ebd0e4af41241c (patch)
tree3bd77ef860e2615380a2e7dc32de3a2461ddc1c1 /sys/netinet6/ah_input.c
parentaee91dcae056c9de6ec29b6850f61935adc6e037 (diff)
downloadFreeBSD-src-6e230b39ea0471b16153d228f9ebd0e4af41241c.zip
FreeBSD-src-6e230b39ea0471b16153d228f9ebd0e4af41241c.tar.gz
- m_cat() may free the mbuf on 2nd arg, so m_pkthdr manipulation has
to happen before the call to m_cat(). - correct signedness mixups. - remove variable that is only assigned too but not referenced. Obtained from: KAME
Diffstat (limited to 'sys/netinet6/ah_input.c')
-rw-r--r--sys/netinet6/ah_input.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/netinet6/ah_input.c b/sys/netinet6/ah_input.c
index 78076b6..e03eb25 100644
--- a/sys/netinet6/ah_input.c
+++ b/sys/netinet6/ah_input.c
@@ -494,9 +494,9 @@ ah4_input(m, off)
goto fail;
}
m_adj(n, stripsiz);
- m_cat(m, n);
/* m_cat does not update m_pkthdr.len */
m->m_pkthdr.len += n->m_pkthdr.len;
+ m_cat(m, n);
}
#endif
@@ -803,10 +803,6 @@ ah6_input(mp, offp, proto)
flowinfo = ip6->ip6_flow;
m_adj(m, off + stripsiz);
if (m->m_len < sizeof(*ip6)) {
- /*
- * m_pullup is prohibited in KAME IPv6 input processing
- * but there's no other way!
- */
m = m_pullup(m, sizeof(*ip6));
if (!m) {
ipsec6stat.in_inval++;
@@ -899,9 +895,9 @@ ah6_input(mp, offp, proto)
goto fail;
}
m_adj(n, stripsiz);
- m_cat(m, n);
/* m_cat does not update m_pkthdr.len */
m->m_pkthdr.len += n->m_pkthdr.len;
+ m_cat(m, n);
}
#endif
ip6 = mtod(m, struct ip6_hdr *);
OpenPOWER on IntegriCloud