]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netfilter/xt_connmark.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / net / netfilter / xt_connmark.c
index 94d5251b3d88a14867c3ec20e5f5bb1ea4483b55..e73fa9b46cf7d1a747077c333e92d7ad0809140f 100644 (file)
@@ -41,14 +41,14 @@ match(const struct sk_buff *skb,
       bool *hotdrop)
 {
        const struct xt_connmark_info *info = matchinfo;
-       struct nf_conn *ct;
+       const struct nf_conn *ct;
        enum ip_conntrack_info ctinfo;
 
        ct = nf_ct_get(skb, &ctinfo);
        if (!ct)
                return false;
 
-       return (((ct->mark) & info->mask) == info->mark) ^ info->invert;
+       return ((ct->mark & info->mask) == info->mark) ^ info->invert;
 }
 
 static bool
@@ -58,7 +58,7 @@ checkentry(const char *tablename,
           void *matchinfo,
           unsigned int hook_mask)
 {
-       struct xt_connmark_info *cm = matchinfo;
+       const struct xt_connmark_info *cm = matchinfo;
 
        if (cm->mark > 0xffffffff || cm->mask > 0xffffffff) {
                printk(KERN_WARNING "connmark: only support 32bit mark\n");
@@ -88,7 +88,7 @@ struct compat_xt_connmark_info {
 
 static void compat_from_user(void *dst, void *src)
 {
-       struct compat_xt_connmark_info *cm = src;
+       const struct compat_xt_connmark_info *cm = src;
        struct xt_connmark_info m = {
                .mark   = cm->mark,
                .mask   = cm->mask,
@@ -99,7 +99,7 @@ static void compat_from_user(void *dst, void *src)
 
 static int compat_to_user(void __user *dst, void *src)
 {
-       struct xt_connmark_info *m = src;
+       const struct xt_connmark_info *m = src;
        struct compat_xt_connmark_info cm = {
                .mark   = m->mark,
                .mask   = m->mask,
@@ -109,7 +109,7 @@ static int compat_to_user(void __user *dst, void *src)
 }
 #endif /* CONFIG_COMPAT */
 
-static struct xt_match xt_connmark_match[] = {
+static struct xt_match xt_connmark_match[] __read_mostly = {
        {
                .name           = "connmark",
                .family         = AF_INET,