Module Name:    src
Committed By:   rmind
Date:           Sun Oct 10 15:29:01 UTC 2010

Modified Files:
        src/sys/net/npf: npf_handler.c

Log Message:
npf_packet_handler: clear M_CANFASTFWD flag, so inspection would work when
fast forwarding is enabled (e.g. with GATEWAY kernel option).  Thanks matt@
for the tip.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/net/npf/npf_handler.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/net/npf/npf_handler.c
diff -u src/sys/net/npf/npf_handler.c:1.2 src/sys/net/npf/npf_handler.c:1.3
--- src/sys/net/npf/npf_handler.c:1.2	Thu Sep 16 04:53:27 2010
+++ src/sys/net/npf/npf_handler.c	Sun Oct 10 15:29:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_handler.c,v 1.2 2010/09/16 04:53:27 rmind Exp $	*/
+/*	$NetBSD: npf_handler.c,v 1.3 2010/10/10 15:29:01 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2010 The NetBSD Foundation, Inc.
@@ -33,13 +33,11 @@
  * NPF packet handler.
  */
 
-#ifdef _KERNEL
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_handler.c,v 1.2 2010/09/16 04:53:27 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_handler.c,v 1.3 2010/10/10 15:29:01 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
-#endif
 
 #include <sys/mbuf.h>
 #include <sys/mutex.h>
@@ -152,6 +150,12 @@
 		}
 		m_freem(*mp);
 		*mp = NULL;
+	} else {
+		/*
+		 * XXX: Disable for now, it will be set accordingly later,
+		 * for optimisations (to reduce inspection).
+		 */
+		(*mp)->m_flags &= ~M_CANFASTFWD;
 	}
 	return error;
 }

Reply via email to