Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net/npf npf_packet_handler: clear M_CANFASTFWD flag, so ...
details: https://anonhg.NetBSD.org/src/rev/2c0a1a4cbc86
branches: trunk
changeset: 757981:2c0a1a4cbc86
user: rmind <rmind%NetBSD.org@localhost>
date: Sun Oct 10 15:29:01 2010 +0000
description:
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.
diffstat:
sys/net/npf/npf_handler.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r 027ed6d7fed8 -r 2c0a1a4cbc86 sys/net/npf/npf_handler.c
--- a/sys/net/npf/npf_handler.c Sun Oct 10 07:03:28 2010 +0000
+++ b/sys/net/npf/npf_handler.c Sun Oct 10 15:29:01 2010 +0000
@@ -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;
}
Home |
Main Index |
Thread Index |
Old Index