Module Name:    src
Committed By:   joerg
Date:           Wed Nov 11 22:19:22 UTC 2009

Modified Files:
        src/sys/netinet6: ip6_forward.c

Log Message:
Clear cksum flags before any further processing like ip_forward does.
Many drivers set the UDP/TCP v4 flags even for v6 traffic and if the
packet is encapsulated with gif, the IPv6 header would get corrupted by
ip_output. Patch suggested by bad@


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/netinet6/ip6_forward.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/netinet6/ip6_forward.c
diff -u src/sys/netinet6/ip6_forward.c:1.66 src/sys/netinet6/ip6_forward.c:1.67
--- src/sys/netinet6/ip6_forward.c:1.66	Wed Mar 18 16:00:23 2009
+++ src/sys/netinet6/ip6_forward.c	Wed Nov 11 22:19:22 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip6_forward.c,v 1.66 2009/03/18 16:00:23 cegger Exp $	*/
+/*	$NetBSD: ip6_forward.c,v 1.67 2009/11/11 22:19:22 joerg Exp $	*/
 /*	$KAME: ip6_forward.c,v 1.109 2002/09/11 08:10:17 sakane Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_forward.c,v 1.66 2009/03/18 16:00:23 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_forward.c,v 1.67 2009/11/11 22:19:22 joerg Exp $");
 
 #include "opt_ipsec.h"
 #include "opt_pfil_hooks.h"
@@ -120,6 +120,10 @@
     int s;
 #endif
 
+	/*
+	 * Clear any in-bound checksum flags for this packet.
+	 */
+	m->m_pkthdr.csum_flags = 0;
 
 #ifdef IPSEC
 	/*

Reply via email to