From ff87172709d0fff1ac43183c38c05732ff2b8c9a Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Tue, 3 Jun 2003 18:47:33 +0000 Subject: module versioning --- kernel/linux2.5/net/bridge/netfilter/ebt_vlan.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'kernel/linux2.5/net/bridge/netfilter/ebt_vlan.c') 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) -- cgit v1.2.3