summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-06-26 19:58:58 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-06-26 19:58:58 +0000
commit67e92269daf2e6cb22ee2de5318527d36b288119 (patch)
treeb0eaa11feef9887ca79b001f5c64616949763b04 /sys
parente330203338184f21a60edf204786c368640fcfd1 (diff)
modify m_pkthdr.len computation to work with both 4.4BSD M_COPY_PKTHDR
and openbsd 2.9+ M_COPY_PKTHDR. discussed with angelos. sync with kame. XXX it is bad to change behavior of existing macro without name change... new behavior will be renamed M_MOVE_PKTHDR soon.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet6/icmp6.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index e9ca365a1e0..32a4078bb2f 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp6.c,v 1.45 2001/06/25 02:59:01 angelos Exp $ */
+/* $OpenBSD: icmp6.c,v 1.46 2001/06/26 19:58:57 itojun Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@@ -618,14 +618,15 @@ icmp6_input(mp, offp, proto)
nicmp6 = (struct icmp6_hdr *)(nip6 + 1);
bcopy(icmp6, nicmp6, sizeof(struct icmp6_hdr));
noff = sizeof(struct ip6_hdr);
- n->m_pkthdr.len = n->m_len =
- noff + sizeof(struct icmp6_hdr);
+ n->m_len = noff + sizeof(struct icmp6_hdr);
/*
* Adjust mbuf. ip6_plen will be adjusted in
* ip6_output().
+ * n->m_pkthdr.len == n0->m_pkthdr.len at this point.
*/
+ n->m_pkthdr.len += noff + sizeof(struct icmp6_hdr);
+ n->m_pkthdr.len -= (off + sizeof(struct icmp6_hdr));
m_adj(n0, off + sizeof(struct icmp6_hdr));
- n->m_pkthdr.len += n0->m_pkthdr.len;
n->m_next = n0;
} else {
nip6 = mtod(n, struct ip6_hdr *);