Skip to contentSkip to conversation

ipt_physdev

PATCH In review Bart De Schuymer 2 participants 4 messages Feb 10, 2003 – Feb 12, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipt_physdev

Hello Harald,

In attachment is a patch for the userspace module corresponding with the ipt_physdev.c kernel module included in the standard 2.5 kernel. This module allows filtering on the bridge ports. Since the header file is already in the standard kernel, I took the liberty of adding the module directly in the extensions/Makefile. Please let me know if you don't think that's the right way...
Note that this kernel module does not exist for 2.4.

Signature · 2 lines
cheers,
Bart
extensions/Makefile renamed from extensions/Makefile.old +1 -1
@@ -5,7 +5,7 @@
 # header files are present in the include/linux directory of this iptables
 # package (HW)
 #
-PF_EXT_SLIB:=ah conntrack dscp ecn esp helper icmp iplimit length limit mac mark multiport owner pkttype rpc standard state tcp tcpmss tos ttl udp unclean DNAT DSCP ECN LOG MARK MASQUERADE MIRROR REDIRECT REJECT SAME SNAT TARPIT TCPMSS TOS TTL ULOG
+PF_EXT_SLIB:=ah conntrack dscp ecn esp helper icmp iplimit length limit mac mark multiport owner physdev pkttype rpc standard state tcp tcpmss tos ttl udp unclean DNAT DSCP ECN LOG MARK MASQUERADE MIRROR REDIRECT REJECT SAME SNAT TARPIT TCPMSS TOS TTL ULOG
 PF6_EXT_SLIB:=eui64 hl icmpv6 length limit mac mark multiport owner standard tcp udp HL LOG MARK
 
 # Optionals
extensions/libipt_physdev.c new file +182 -0

182 lines not on this page · raw message

include/linux/netfilter_ipv4/ipt_physdev.h new file +19 -0
@@ -0,0 +1,19 @@
+#ifndef _IPT_PHYSDEV_H
+#define _IPT_PHYSDEV_H
+
+#ifdef __KERNEL__
+#include <linux/if.h>
+#endif
+
+#define IPT_PHYSDEV_OP_MATCH_IN 0x01
+#define IPT_PHYSDEV_OP_MATCH_OUT 0x02
+
+struct ipt_physdev_info {
+	u_int8_t invert;
+	char physindev[IFNAMSIZ];
+	char in_mask[IFNAMSIZ];
+	char physoutdev[IFNAMSIZ];
+	char out_mask[IFNAMSIZ];
+};
+
+#endif /*_IPT_PHYSDEV_H*/
#1 lore raw
Quoted 7 lines · Bart De Schuymer

Hello Harald,

In attachment is a patch for the userspace module corresponding with the ipt_physdev.c kernel module included in the standard 2.5 kernel. This module allows filtering on the bridge ports. Since the header file is already in the standard kernel, I took the liberty of adding the module directly in the extensions/Makefile.

That's perfectly fine with me. patch applied.

Quoted 1 line

Note that this kernel module does not exist for 2.4.

no problem. Maybe you could add a patch for iptables.8, adding documentation and stating that there is no physdev support for 2.4.x ?

Quoted 1 line

Bart

Signature · 4 lines
- Harald Welte <[email protected]>               http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
 as I'm the dictator."  --  George W. Bush Dec 18, 2000
#2 lore raw
Quoted 1 line

That's perfectly fine with me. patch applied.

Thanks.

Quoted 2 lines

Maybe you could add a patch for iptables.8, adding documentation and stating that there is no physdev support for 2.4.x ?

Sure. Just a quick question: wouldn't it be nice if the extensions were discussed alphabetically in the man page? If so, I'll alphabetize them in my patch, else I'll just add the entry on the end of the match section.

Signature · 2 lines
cheers,
Bart
#3 lore raw
Quoted 3 lines · Bart De Schuymer

Sure. Just a quick question: wouldn't it be nice if the extensions were discussed alphabetically in the man page? If so, I'll alphabetize them in my patch, else I'll just add the entry on the end of the match section.

yes, that would be great!

Quoted 1 line

Bart

Signature · 4 lines
- Harald Welte <[email protected]>               http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
 as I'm the dictator."  --  George W. Bush Dec 18, 2000