diff options
Diffstat (limited to 'sys/netinet6/icmp6.c')
-rw-r--r-- | sys/netinet6/icmp6.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 6a5884e..4fa6434 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -563,6 +563,9 @@ icmp6_input(mp, offp, proto) break; } MGETHDR(n, M_NOWAIT, n0->m_type); + n0len = n0->m_pkthdr.len; /* save for use below */ + if (n) + M_MOVE_PKTHDR(n, n0); if (n && maxlen >= MHLEN) { MCLGET(n, M_NOWAIT); if ((n->m_flags & M_EXT) == 0) { @@ -575,8 +578,6 @@ icmp6_input(mp, offp, proto) m_freem(n0); break; } - n0len = n0->m_pkthdr.len; /* save for use below */ - M_MOVE_PKTHDR(n, n0); /* * Copy IPv6 and ICMPv6 only. */ |