summaryrefslogtreecommitdiffstats
path: root/kernel/linux2.5/net/bridge/netfilter/ebt_vlan.c
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2003-06-03 18:47:33 +0000
committerBart De Schuymer <bdschuym@pandora.be>2003-06-03 18:47:33 +0000
commitff87172709d0fff1ac43183c38c05732ff2b8c9a (patch)
tree21bf3aae695eac19e9151b656379d636d2837e47 /kernel/linux2.5/net/bridge/netfilter/ebt_vlan.c
parent87cc1b649c8268755bbbd3fd9593a23b9e20d8fc (diff)
module versioning
Diffstat (limited to 'kernel/linux2.5/net/bridge/netfilter/ebt_vlan.c')
-rw-r--r--kernel/linux2.5/net/bridge/netfilter/ebt_vlan.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/kernel/linux2.5/net/bridge/netfilter/ebt_vlan.c b/kernel/linux2.5/net/bridge/netfilter/ebt_vlan.c
index 54120a7..5e20e88 100644
--- a/kernel/linux2.5/net/bridge/netfilter/ebt_vlan.c
+++ b/kernel/linux2.5/net/bridge/netfilter/ebt_vlan.c
@@ -42,10 +42,8 @@ MODULE_LICENSE("GPL");
#define EXIT_ON_MISMATCH(_MATCH_,_MASK_) {if (!((info->_MATCH_ == _MATCH_)^!!(info->invflags & _MASK_))) return EBT_NOMATCH;}
static int
-ebt_filter_vlan(const struct sk_buff *skb,
- const struct net_device *in,
- const struct net_device *out,
- const void *data, unsigned int datalen)
+ebt_filter_vlan(const struct sk_buff *skb, const struct net_device *in,
+ const struct net_device *out, const void *data, unsigned int datalen)
{
struct ebt_vlan_info *info = (struct ebt_vlan_info *) data;
struct vlan_ethhdr frame;
@@ -86,10 +84,11 @@ ebt_filter_vlan(const struct sk_buff *skb,
return EBT_MATCH;
}
+static struct ebt_match filter_vlan;
static int
-ebt_check_vlan(const char *tablename,
- unsigned int hooknr,
- const struct ebt_entry *e, void *data, unsigned int datalen)
+ebt_check_vlan(const char *tablename, unsigned int hooknr,
+ const struct ebt_entry *e, void *data, unsigned int datalen,
+ unsigned int version)
{
struct ebt_vlan_info *info = (struct ebt_vlan_info *) data;
@@ -101,6 +100,10 @@ ebt_check_vlan(const char *tablename,
return -EINVAL;
}
+ if (ebt_check_version(version, filter_vlan.version,
+ filter_vlan.name))
+ return -EINVAL;
+
/* Is it 802.1Q frame checked? */
if (e->ethproto != __constant_htons(ETH_P_8021Q)) {
DEBUG_MSG
@@ -174,6 +177,7 @@ static struct ebt_match filter_vlan = {
.match = ebt_filter_vlan,
.check = ebt_check_vlan,
.me = THIS_MODULE,
+ .version = VERSIONIZE(1,0),
};
static int __init init(void)