diff options
author | 2003-07-29 03:21:57 +0000 | |
---|---|---|
committer | 2003-07-29 03:21:57 +0000 | |
commit | 9d452b04c054d4849b69744ec9b618696b60186c (patch) | |
tree | d596e676ea773956221c51c79500139d13d3f62f | |
parent | off-by-one in a printf %s (diff) | |
download | wireguard-openbsd-9d452b04c054d4849b69744ec9b618696b60186c.tar.xz wireguard-openbsd-9d452b04c054d4849b69744ec9b618696b60186c.zip |
fixup ip_len back to wire format after reass.
-rw-r--r-- | sys/netinet/ip_input.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 804fa3204f3..13e93373939 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.113 2003/07/09 22:03:16 itojun Exp $ */ +/* $OpenBSD: ip_input.c,v 1.114 2003/07/29 03:21:57 itojun Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -604,6 +604,7 @@ found: ipstat.ips_reassembled++; ip = mtod(m, struct ip *); hlen = ip->ip_hl << 2; + ip->ip_len = htons(ntohs(ip->ip_len) + hlen); } else if (fp) ip_freef(fp); |