]> err.no Git - linux-2.6/blobdiff - net/ipv4/netfilter/ipt_ecn.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
[linux-2.6] / net / ipv4 / netfilter / ipt_ecn.c
index ba3a17e0f84847cea47f66e9e1d79c72b298bdfe..d6925c6740692a730c64fc6313bc788fd8a72e45 100644 (file)
@@ -32,7 +32,8 @@ static inline bool match_tcp(const struct sk_buff *skb,
                             const struct ipt_ecn_info *einfo,
                             bool *hotdrop)
 {
-       struct tcphdr _tcph, *th;
+       struct tcphdr _tcph;
+       const struct tcphdr *th;
 
        /* In practice, TCP match does this, so can't fail.  But let's
         * be good citizens.
@@ -87,30 +88,30 @@ static bool match(const struct sk_buff *skb,
        return true;
 }
 
-static int checkentry(const char *tablename, const void *ip_void,
-                     const struct xt_match *match,
-                     void *matchinfo, unsigned int hook_mask)
+static bool checkentry(const char *tablename, const void *ip_void,
+                      const struct xt_match *match,
+                      void *matchinfo, unsigned int hook_mask)
 {
        const struct ipt_ecn_info *info = matchinfo;
        const struct ipt_ip *ip = ip_void;
 
        if (info->operation & IPT_ECN_OP_MATCH_MASK)
-               return 0;
+               return false;
 
        if (info->invert & IPT_ECN_OP_MATCH_MASK)
-               return 0;
+               return false;
 
        if (info->operation & (IPT_ECN_OP_MATCH_ECE|IPT_ECN_OP_MATCH_CWR)
            && ip->proto != IPPROTO_TCP) {
                printk(KERN_WARNING "ipt_ecn: can't match TCP bits in rule for"
                       " non-tcp packets\n");
-               return 0;
+               return false;
        }
 
-       return 1;
+       return true;
 }
 
-static struct xt_match ecn_match = {
+static struct xt_match ecn_match __read_mostly = {
        .name           = "ecn",
        .family         = AF_INET,
        .match          = match,