[NETFILTER]: nf_conntrack: use hashtable for expectations
[deliverable/linux.git] / net / netfilter / xt_mark.c
index 10c6799cd56a9322f005db74fd4b0c8ec4f8feb7..c02a7f8f3925023aebb859d715c42588cb09512f 100644 (file)
@@ -34,7 +34,7 @@ match(const struct sk_buff *skb,
        return ((skb->mark & info->mask) == info->mark) ^ info->invert;
 }
 
-static int
+static bool
 checkentry(const char *tablename,
           const void *entry,
           const struct xt_match *match,
@@ -45,9 +45,9 @@ checkentry(const char *tablename,
 
        if (minfo->mark > 0xffffffff || minfo->mask > 0xffffffff) {
                printk(KERN_WARNING "mark: only supports 32bit mark\n");
-               return 0;
+               return false;
        }
-       return 1;
+       return true;
 }
 
 #ifdef CONFIG_COMPAT
@@ -60,7 +60,7 @@ struct compat_xt_mark_info {
 
 static void compat_from_user(void *dst, void *src)
 {
-       struct compat_xt_mark_info *cm = src;
+       const struct compat_xt_mark_info *cm = src;
        struct xt_mark_info m = {
                .mark   = cm->mark,
                .mask   = cm->mask,
@@ -71,7 +71,7 @@ static void compat_from_user(void *dst, void *src)
 
 static int compat_to_user(void __user *dst, void *src)
 {
-       struct xt_mark_info *m = src;
+       const struct xt_mark_info *m = src;
        struct compat_xt_mark_info cm = {
                .mark   = m->mark,
                .mask   = m->mask,
@@ -81,7 +81,7 @@ static int compat_to_user(void __user *dst, void *src)
 }
 #endif /* CONFIG_COMPAT */
 
-static struct xt_match xt_mark_match[] = {
+static struct xt_match xt_mark_match[] __read_mostly = {
        {
                .name           = "mark",
                .family         = AF_INET,
This page took 0.042071 seconds and 5 git commands to generate.