Skip to contentSkip to conversation

netfilter: bridge: add reject support

PATCH New Pablo Neira Ayuso 1 participant 1 message Jun 27, 2014

Subsystems (3)
lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 netfilter: bridge: add reject support

So you can reject IPv4 and IPv6 packets from bridge tables. If the ether proto is now known, default on dropping the packet instead.

---
 net/bridge/netfilter/Kconfig             |    6 +++
 net/bridge/netfilter/Makefile            |    1 +
 net/bridge/netfilter/nft_reject_bridge.c |   67 ++++++++++++++++++++++++++++++
 3 files changed, 74 insertions(+)
 create mode 100644 net/bridge/netfilter/nft_reject_bridge.c
net/bridge/netfilter/Kconfig +6 -0
index 4ce0b31..9cebf47 100644
@@ -14,6 +14,12 @@ config NFT_BRIDGE_META
 	help
 	  Add support for bridge dedicated meta key.
 
+config NFT_BRIDGE_REJECT
+	tristate "Netfilter nf_tables bridge reject support"
+	depends on NFT_REJECT && NFT_REJECT_IPV4 && NFT_REJECT_IPV6
+	help
+	  Add support to reject packets.
+
 config NF_LOG_BRIDGE
 	tristate "Bridge packet logging"
 
net/bridge/netfilter/Makefile +1 -0
index 1f78ea0..061d121 100644
@@ -4,6 +4,7 @@
 
 obj-$(CONFIG_NF_TABLES_BRIDGE) += nf_tables_bridge.o
 obj-$(CONFIG_NFT_BRIDGE_META)  += nft_meta_bridge.o
+obj-$(CONFIG_NFT_BRIDGE_REJECT)  += nft_reject_bridge.o
 
 # packet logging
 obj-$(CONFIG_NF_LOG_BRIDGE) += nf_log_bridge.o
net/bridge/netfilter/nft_reject_bridge.c new file +67 -0

67 lines not on this page · raw message

Signature · 1 line
1.7.10.4