diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-12-31 12:55:47 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-12-31 12:55:47 +0000 |
commit | 62c1881ec57654831d458d5dac818fd1b925e3f9 (patch) | |
tree | 56dc65a39fe3d2a4bd2a0c096b539f9601d82815 /sys/netinet | |
parent | 5b6dac4e8a88abdee14dfe43946daf2b6efd8d88 (diff) |
one last fix for byte order. now all architectures return the same correct icmp packets
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_icmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 49ceef42a68..5ecf31a133e 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_icmp.c,v 1.13 1998/12/31 12:40:34 deraadt Exp $ */ +/* $OpenBSD: ip_icmp.c,v 1.14 1998/12/31 12:55:46 deraadt Exp $ */ /* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */ /* @@ -148,7 +148,7 @@ icmp_error(n, type, code, dest, destifp) icp->icmp_code = code; bcopy((caddr_t)oip, (caddr_t)&icp->icmp_ip, icmplen); nip = &icp->icmp_ip; - nip->ip_len = htons((u_int16_t)(nip->ip_len + oiplen)); + nip->ip_len = htons((u_int16_t)(ntohs(nip->ip_len) + oiplen)); m0.m_next = NULL; /* correct nip->ip_sum */ m0.m_data = (char *)nip; |