Re: [PATCH][ebtables][vlan] ebt_vlan_t target
From: Ingo Oeser <hidden>
Date: 2006-07-06 11:15:23
Hi Dawid, Dawid Ciężarkiewicz schrieb:
my name is Dawid Ciezarkiewicz. As a part of my daily job I was to write kernel module for ebtables to let linux bridges change vlan ids in fly using logic provided by ebtables matches. After hours of tries and kernel learning, reading and googlin' I've finally come to the place where I've got working module that does what I want. I'm looking for comments of more advanced linux developers. Please note that this is my first linux patch I've ever made.
First of all: You should not implemented "--vlan-target". Always return EBT_CONTINUE. That saves a lot of (duplicated) code (you can express the same using some more rules) while keeping the same flexibility level. Rules for transforming/mangling and decision rules should be seperate.
quoted hunk ↗ jump to hunk
diff -Nur linux-2.6.17.orig/net/bridge/netfilter/Kconfig linux-2.6.17/net/bridge/netfilter/Kconfig--- linux-2.6.17.orig/net/bridge/netfilter/Kconfig 2006-06-1803:49:35.000000000 +0200+++ linux-2.6.17/net/bridge/netfilter/Kconfig 2006-06-28 20:48:27.000000000 +0200@@ -165,6 +165,15 @@ To compile it as a module, choose M here. If unsure, say N. +config BRIDGE_EBT_VLAN_T + tristate "ebt: vlan target support" + depends on BRIDGE_NF_EBTABLES + help + This option adds the vlan target. + + To compile it as a module, choose M here. If unsure, say N. + +
Please put your nice explanations "to change vlan ids in fly" from your email here. And short ebtables example for the common use case might help, too. But only, if it is not more than two lines or such. Otherwise omit it. I cannot comment on rest of the patch and hope other people will do :-) Regards Ingo Oeser