summaryrefslogtreecommitdiff
path: root/sys/net/if_gre.c
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-07-09 22:03:17 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-07-09 22:03:17 +0000
commit2283674da28e5dafc9ce3467ef20c59a96b9e900 (patch)
treeebb49711fe1edf0247e2acb7b65e705fd4a922b9 /sys/net/if_gre.c
parente4575c1ca699d4eba1c2ebb28715c779ef686446 (diff)
do not flip ip_len/ip_off in netinet stack. deraadt ok.
(please test, especially PF portion)
Diffstat (limited to 'sys/net/if_gre.c')
-rw-r--r--sys/net/if_gre.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index b291dfbe948..9e76a114461 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gre.c,v 1.26 2003/03/25 18:10:06 millert Exp $ */
+/* $OpenBSD: if_gre.c,v 1.27 2003/07/09 22:03:15 itojun Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -302,8 +302,7 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
/* Copy Mobility header */
inp = mtod(m, struct ip *);
bcopy(&mob_h, (caddr_t)(inp + 1), (unsigned) msiz);
- NTOHS(inp->ip_len);
- inp->ip_len += msiz;
+ inp->ip_len = htons(ntohs(inp->ip_len) + msiz);
} else { /* AF_INET */
IF_DROP(&ifp->if_snd);
m_freem(m);