]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netfilter/xt_tcpmss.c
[NETFILTER]: nf_conntrack: kill unique ID
[linux-2.6-omap-h63xx.git] / net / netfilter / xt_tcpmss.c
index a3682fe2f1926268cd7cb5269c27d149c23bb108..cd5f6d758c6806b46032e5c264e417ec66931acf 100644 (file)
@@ -23,7 +23,7 @@ MODULE_AUTHOR("Marc Boucher <marc@mbsi.ca>");
 MODULE_DESCRIPTION("iptables TCP MSS match module");
 MODULE_ALIAS("ipt_tcpmss");
 
-static int
+static bool
 match(const struct sk_buff *skb,
       const struct net_device *in,
       const struct net_device *out,
@@ -31,7 +31,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct xt_tcpmss_match_info *info = matchinfo;
        struct tcphdr _tcph, *th;
@@ -64,9 +64,9 @@ match(const struct sk_buff *skb,
                        u_int16_t mssval;
 
                        mssval = (op[i+2] << 8) | op[i+3];
-                       
+
                        return (mssval >= info->mss_min &&
-                               mssval <= info->mss_max) ^ info->invert;
+                               mssval <= info->mss_max) ^ info->invert;
                }
                if (op[i] < 2)
                        i++;
@@ -77,11 +77,11 @@ out:
        return info->invert;
 
 dropit:
-       *hotdrop = 1;
-       return 0;
+       *hotdrop = true;
+       return false;
 }
 
-static struct xt_match xt_tcpmss_match[] = {
+static struct xt_match xt_tcpmss_match[] __read_mostly = {
        {
                .name           = "tcpmss",
                .family         = AF_INET,