summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ipip.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-07-16 16:12:16 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-07-16 16:12:16 +0000
commit96c7e2683bd59830d2aaebfd2956afa3bce9323d (patch)
tree9890f5cc1f5ae73015b15463ae9e638007de9361 /sys/netinet/ip_ipip.c
parent76e68cee595bb0e514f24534e339a911d8f08032 (diff)
Expand ancient NTOHL/NTOHS/HTONS/HTONL macros.
ok guenther@, henning@
Diffstat (limited to 'sys/netinet/ip_ipip.c')
-rw-r--r--sys/netinet/ip_ipip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c
index d75627ac37f..8d42e63e8cc 100644
--- a/sys/netinet/ip_ipip.c
+++ b/sys/netinet/ip_ipip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipip.c,v 1.62 2015/07/15 22:16:42 deraadt Exp $ */
+/* $OpenBSD: ip_ipip.c,v 1.63 2015/07/16 16:12:15 mpi Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -457,9 +457,9 @@ ipip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int dummy,
m_copydata(m, sizeof(struct ip) +
offsetof(struct ip, ip_off),
sizeof(u_int16_t), (caddr_t) &ipo->ip_off);
- NTOHS(ipo->ip_off);
+ ipo->ip_off = ntohs(ipo->ip_off);
ipo->ip_off &= ~(IP_DF | IP_MF | IP_OFFMASK);
- HTONS(ipo->ip_off);
+ ipo->ip_off = htons(ipo->ip_off);
}
#ifdef INET6
else if (tp == (IPV6_VERSION >> 4)) {