]> err.no Git - linux-2.6/blobdiff - net/bridge/netfilter/ebt_vlan.c
Merge branch 'for-2.6.27' of git://git.marvell.com/mv643xx_eth into upstream-next
[linux-2.6] / net / bridge / netfilter / ebt_vlan.c
index 0ddf7499d4962f34a28e4d5c87a0ce1e944593e4..ab60b0dade80439ea9a7c1ac3a261366ec5ee850 100644 (file)
@@ -31,8 +31,7 @@ static int debug;
 module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "debug=1 is turn on debug messages");
 MODULE_AUTHOR("Nick Fedchik <nick@fedchik.org.ua>");
-MODULE_DESCRIPTION("802.1Q match module (ebtables extension), v"
-                  MODULE_VERS);
+MODULE_DESCRIPTION("Ebtables: 802.1Q VLAN tag match");
 MODULE_LICENSE("GPL");
 
 
@@ -46,8 +45,9 @@ ebt_filter_vlan(const struct sk_buff *skb,
                const struct net_device *out,
                const void *data, unsigned int datalen)
 {
-       struct ebt_vlan_info *info = (struct ebt_vlan_info *) data;
-       struct vlan_hdr _frame, *fp;
+       const struct ebt_vlan_info *info = data;
+       const struct vlan_hdr *fp;
+       struct vlan_hdr _frame;
 
        unsigned short TCI;     /* Whole TCI, given from parsed frame */
        unsigned short id;      /* VLAN ID, given from frame TCI */
@@ -91,7 +91,7 @@ ebt_check_vlan(const char *tablename,
               unsigned int hooknr,
               const struct ebt_entry *e, void *data, unsigned int datalen)
 {
-       struct ebt_vlan_info *info = (struct ebt_vlan_info *) data;
+       struct ebt_vlan_info *info = data;
 
        /* Parameters buffer overflow check */
        if (datalen != EBT_ALIGN(sizeof(struct ebt_vlan_info))) {
@@ -169,7 +169,7 @@ ebt_check_vlan(const char *tablename,
        return 0;
 }
 
-static struct ebt_match filter_vlan = {
+static struct ebt_match filter_vlan __read_mostly = {
        .name           = EBT_VLAN_MATCH,
        .match          = ebt_filter_vlan,
        .check          = ebt_check_vlan,