]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/bridge/netfilter/ebt_vlan.c
x86: fix x86_32 builds for summit and es7000 arch's
[linux-2.6-omap-h63xx.git] / net / bridge / netfilter / ebt_vlan.c
index 8cc4257a1aded3e8fb4d6e49df3a0bdf1078479c..3dddd489328e19bedb8c0876cfc0884947100811 100644 (file)
@@ -41,12 +41,9 @@ MODULE_LICENSE("GPL");
 #define EXIT_ON_MISMATCH(_MATCH_,_MASK_) {if (!((info->_MATCH_ == _MATCH_)^!!(info->invflags & _MASK_))) return false; }
 
 static bool
-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_vlan_mt(const struct sk_buff *skb, const struct xt_match_param *par)
 {
-       const struct ebt_vlan_info *info = data;
+       const struct ebt_vlan_info *info = par->matchinfo;
        const struct vlan_hdr *fp;
        struct vlan_hdr _frame;
 
@@ -87,12 +84,10 @@ ebt_filter_vlan(const struct sk_buff *skb,
        return true;
 }
 
-static bool
-ebt_check_vlan(const char *tablename,
-              unsigned int hooknr,
-              const struct ebt_entry *e, void *data, unsigned int datalen)
+static bool ebt_vlan_mt_check(const struct xt_mtchk_param *par)
 {
-       struct ebt_vlan_info *info = data;
+       struct ebt_vlan_info *info = par->matchinfo;
+       const struct ebt_entry *e = par->entryinfo;
 
        /* Is it 802.1Q frame checked? */
        if (e->ethproto != htons(ETH_P_8021Q)) {
@@ -162,10 +157,12 @@ ebt_check_vlan(const char *tablename,
        return true;
 }
 
-static struct ebt_match filter_vlan __read_mostly = {
-       .name           = EBT_VLAN_MATCH,
-       .match          = ebt_filter_vlan,
-       .check          = ebt_check_vlan,
+static struct xt_match ebt_vlan_mt_reg __read_mostly = {
+       .name           = "vlan",
+       .revision       = 0,
+       .family         = NFPROTO_BRIDGE,
+       .match          = ebt_vlan_mt,
+       .checkentry     = ebt_vlan_mt_check,
        .matchsize      = XT_ALIGN(sizeof(struct ebt_vlan_info)),
        .me             = THIS_MODULE,
 };
@@ -175,12 +172,12 @@ static int __init ebt_vlan_init(void)
        DEBUG_MSG("ebtables 802.1Q extension module v"
                  MODULE_VERS "\n");
        DEBUG_MSG("module debug=%d\n", !!debug);
-       return ebt_register_match(&filter_vlan);
+       return xt_register_match(&ebt_vlan_mt_reg);
 }
 
 static void __exit ebt_vlan_fini(void)
 {
-       ebt_unregister_match(&filter_vlan);
+       xt_unregister_match(&ebt_vlan_mt_reg);
 }
 
 module_init(ebt_vlan_init);