Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet6 Clear cksum flags before any further processing...



details:   https://anonhg.NetBSD.org/src/rev/36ec296b6624
branches:  trunk
changeset: 748961:36ec296b6624
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Nov 11 22:19:22 2009 +0000

description:
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@

diffstat:

 sys/netinet6/ip6_forward.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r d49e752c3f37 -r 36ec296b6624 sys/netinet6/ip6_forward.c
--- a/sys/netinet6/ip6_forward.c        Wed Nov 11 21:53:46 2009 +0000
+++ b/sys/netinet6/ip6_forward.c        Wed Nov 11 22:19:22 2009 +0000
@@ -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
        /*



Home | Main Index | Thread Index | Old Index