diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-09-26 23:59:16 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-09-26 23:59:16 +0000 |
commit | bff2ea64ef24afa4af173d5fab3cee941441520b (patch) | |
tree | 14c2e7326fb19f82d6d591da787581e3fbe2c618 /sys/netinet/ip_icmp.c | |
parent | 0286086d77f84487f41f1ea52b58065b52809749 (diff) |
the mbuf copy was still being modified; now totally correct that.
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r-- | sys/netinet/ip_icmp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 59a1d73863e..bdd165d9fbe 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_icmp.c,v 1.17 1999/09/23 07:20:35 deraadt Exp $ */ +/* $OpenBSD: ip_icmp.c,v 1.18 1999/09/26 23:59:15 deraadt Exp $ */ /* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */ /* @@ -160,10 +160,10 @@ icmp_error(n, type, code, dest, destifp) } icp->icmp_code = code; - HTONS(oip->ip_off); - HTONS(oip->ip_len); bcopy((caddr_t)oip, (caddr_t)&icp->icmp_ip, icmplen); nip = &icp->icmp_ip; + nip->ip_off = htons(nip->ip_off); + nip->ip_len = htons(nip->ip_len); m0.m_next = NULL; /* correct nip->ip_sum */ m0.m_data = (char *)nip; @@ -183,6 +183,7 @@ icmp_error(n, type, code, dest, destifp) m->m_pkthdr.rcvif = n->m_pkthdr.rcvif; nip = mtod(m, struct ip *); bcopy((caddr_t)oip, (caddr_t)nip, sizeof(struct ip)); + nip->ip_off = htons(nip->ip_off); nip->ip_len = m->m_len; nip->ip_hl = sizeof(struct ip) >> 2; nip->ip_p = IPPROTO_ICMP; |