diff options
author | 2004-11-17 12:06:16 +0000 | |
---|---|---|
committer | 2004-11-17 12:06:16 +0000 | |
commit | 086d35e921e7875c802ccd95cc6f697d940116cc (patch) | |
tree | 00e9df70807d86c3634b671bddd192cc2760b9e4 /sys/netinet/ip_ipip.c | |
parent | document the new update framework for bulk builds. (diff) | |
download | wireguard-openbsd-086d35e921e7875c802ccd95cc6f697d940116cc.tar.xz wireguard-openbsd-086d35e921e7875c802ccd95cc6f697d940116cc.zip |
ip6_plen does not include the size of the ipv6 header; ok itojun
Diffstat (limited to 'sys/netinet/ip_ipip.c')
-rw-r--r-- | sys/netinet/ip_ipip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c index 5772e6e8ec7..e1aca31dc4b 100644 --- a/sys/netinet/ip_ipip.c +++ b/sys/netinet/ip_ipip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipip.c,v 1.31 2004/06/21 20:44:54 itojun Exp $ */ +/* $OpenBSD: ip_ipip.c,v 1.32 2004/11/17 12:06:16 markus Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -540,7 +540,7 @@ ipip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, ip6o->ip6_flow = 0; ip6o->ip6_vfc &= ~IPV6_VERSION_MASK; ip6o->ip6_vfc |= IPV6_VERSION; - ip6o->ip6_plen = htons(m->m_pkthdr.len); + ip6o->ip6_plen = htons(m->m_pkthdr.len - sizeof(*ip6o)); ip6o->ip6_hlim = ip_defttl; in6_embedscope(&ip6o->ip6_src, &tdb->tdb_src.sin6, NULL, NULL); in6_embedscope(&ip6o->ip6_dst, &tdb->tdb_dst.sin6, NULL, NULL); |