[PATCH 2/3] bridge: add support for the EBT_QUEUE target

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

 



Add the EBT_QUEUE standard target for ebtables.

Signed-off-by: Pierre Chifflier <chifflier@xxxxxxxxxxxx>
---
 include/linux/netfilter_bridge/ebtables.h |    3 ++-
 net/bridge/netfilter/ebtables.c           |    5 +++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h
index 1c6f0c5..d5085eb 100644
--- a/include/linux/netfilter_bridge/ebtables.h
+++ b/include/linux/netfilter_bridge/ebtables.h
@@ -25,7 +25,8 @@
 #define EBT_DROP     -2
 #define EBT_CONTINUE -3
 #define EBT_RETURN   -4
-#define NUM_STANDARD_TARGETS   4
+#define EBT_QUEUE    -5
+#define NUM_STANDARD_TARGETS   5
 /* ebtables target modules store the verdict inside an int. We can
  * reclaim a part of this int for backwards compatible extensions.
  * The 4 lsb are more than enough to store the verdict. */
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 5f1825d..156a7d7 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -251,6 +251,11 @@ unsigned int ebt_do_table (unsigned int hook, struct sk_buff *skb,
 			read_unlock_bh(&table->lock);
 			return NF_ACCEPT;
 		}
+		if (verdict == EBT_QUEUE) {
+			u32 queue_num = 1; // XXX hardcoded
+			read_unlock_bh(&table->lock);
+			return NF_QUEUE_NR(queue_num);
+		}
 		if (verdict == EBT_DROP) {
 			read_unlock_bh(&table->lock);
 			return NF_DROP;
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux