summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-08-04 00:26:08 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-08-04 00:26:08 +0000
commita0b5a5740cbf7859ee8285a168638b76a1b49f3c (patch)
tree09296df01b976ed5a359cb53c6c62279f108a2a8 /sys
parent6a45b9c95ddd4df2f390a5c8a80ce3ff1188eb58 (diff)
Worked out the logic (thanks to pt98asp@student.hk-r.se and
pt98kfr@student.hk-r.se -- I still don't know why rev1.5 didn't work).
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_ipip.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c
index 537f6aef3c8..a769d909147 100644
--- a/sys/netinet/ip_ipip.c
+++ b/sys/netinet/ip_ipip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipip.c,v 1.6 2000/08/03 17:31:20 angelos Exp $ */
+/* $OpenBSD: ip_ipip.c,v 1.7 2000/08/04 00:26:07 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -468,8 +468,9 @@ ipip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
*/
m_copydata(m, sizeof(struct ip) + offsetof(struct ip, ip_off),
sizeof(u_int16_t), (caddr_t) &ipo->ip_off);
- ipo->ip_off = htons(ipo->ip_off & ~(IP_DF | IP_MF |
- IP_OFFMASK));
+ NTOHS(ipo->ip_off);
+ ipo->ip_off &= ~(IP_DF | IP_MF | IP_OFFMASK));
+ HTONS(ipo->ip_off);
}
#ifdef INET6
else if (tp == (IPV6_VERSION >> 4))