summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-07-25 03:58:21 +0000
committerbrian <brian@FreeBSD.org>1997-07-25 03:58:21 +0000
commit8ebf5a9ddf8ce226d9cf1b01c90a1e920ac0c2a8 (patch)
treee07dbd14f8c57d10313150208aab445ee3f3fc9e /sys/netinet
parentfa74c6b5cf20bf83ae7fe9dadbdf1c726a49e812 (diff)
downloadFreeBSD-src-8ebf5a9ddf8ce226d9cf1b01c90a1e920ac0c2a8.zip
FreeBSD-src-8ebf5a9ddf8ce226d9cf1b01c90a1e920ac0c2a8.tar.gz
Recalculate ip_sum before passing a
re-assembled packet to a divert port. Pointed-out by: Ari Suutari <ari@suutari.iki.fi> VS: then name the system in this line, otherwise delete it.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_input.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 903adaf..0be684a 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_input.c 8.2 (Berkeley) 1/4/94
- * $Id: ip_input.c,v 1.62 1997/05/11 18:05:37 tegge Exp $
+ * $Id: ip_input.c,v 1.63 1997/06/02 05:02:36 julian Exp $
* $ANA: ip_input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $
*/
@@ -512,6 +512,20 @@ found:
return;
ipstat.ips_reassembled++;
m = dtom(ip);
+#ifdef IPDIVERT
+ if (frag_divert_port) {
+ ip->ip_len += hlen;
+ HTONS(ip->ip_len);
+ HTONS(ip->ip_off);
+ HTONS(ip->ip_id);
+ ip->ip_sum = 0;
+ ip->ip_sum = in_cksum_hdr(ip);
+ NTOHS(ip->ip_id);
+ NTOHS(ip->ip_off);
+ NTOHS(ip->ip_len);
+ ip->ip_len -= hlen;
+ }
+#endif
} else
if (fp)
ip_freef(fp);
OpenPOWER on IntegriCloud