Module Name:    src
Committed By:   maxv
Date:           Fri Oct 12 05:41:18 UTC 2018

Modified Files:
        src/sys/netinet: ip_reass.c

Log Message:
Force ip_off to zero when the reassembly is complete. This was lost in my
rev1.19 - before that the IP struct was clobbered for the reassembly, but
it actually implicitly guaranteed that the first fragment of the packet
would end up with ip_off = 0, and this was a desired behavior.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/netinet/ip_reass.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/ip_reass.c
diff -u src/sys/netinet/ip_reass.c:1.20 src/sys/netinet/ip_reass.c:1.21
--- src/sys/netinet/ip_reass.c:1.20	Mon Sep 17 08:11:27 2018
+++ src/sys/netinet/ip_reass.c	Fri Oct 12 05:41:18 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_reass.c,v 1.20 2018/09/17 08:11:27 maxv Exp $	*/
+/*	$NetBSD: ip_reass.c,v 1.21 2018/10/12 05:41:18 maxv Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988, 1993
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_reass.c,v 1.20 2018/09/17 08:11:27 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_reass.c,v 1.21 2018/10/12 05:41:18 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -402,6 +402,7 @@ insert:
 	 * header visible.
 	 */
 	ip->ip_len = htons((ip->ip_hl << 2) + next);
+	ip->ip_off = htons(0);
 	ip->ip_src = fp->ipq_src;
 	ip->ip_dst = fp->ipq_dst;
 	free(fp, M_FTABLE);

Reply via email to