summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ipip.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-08-03 07:55:49 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-08-03 07:55:49 +0000
commit8bd38bcac701a585d2def9670f2f434a5412ba1c (patch)
tree3a492aaed0b12dfb485a1b17e7cf0f0f8c2ea193 /sys/netinet/ip_ipip.c
parent65be5090c9cfd1b48c4204f0e846b45c26897942 (diff)
Correct handling of ip_off (askk@rsn.hk-r.se)
Diffstat (limited to 'sys/netinet/ip_ipip.c')
-rw-r--r--sys/netinet/ip_ipip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c
index a6386f8ebdf..c9a9b64bc08 100644
--- a/sys/netinet/ip_ipip.c
+++ b/sys/netinet/ip_ipip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipip.c,v 1.3 2000/06/20 04:19:11 itojun Exp $ */
+/* $OpenBSD: ip_ipip.c,v 1.4 2000/08/03 07:55:48 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -468,7 +468,8 @@ 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 &= ~(IP_DF | IP_MF | IP_OFFMASK);
+ ipo->ip_off = ntohs(ipo->ip_off) & ~(IP_DF | IP_MF |
+ IP_OFFMASK);
}
#ifdef INET6
else if (tp == (IPV6_VERSION >> 4))