]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/netfilter/ip6t_hl.c
Merge branch 'ioat-md-accel-for-linus' of git://lost.foo-projects.org/~dwillia2/git/iop
[linux-2.6-omap-h63xx.git] / net / ipv6 / netfilter / ip6t_hl.c
index cbf49cffa067fd28ff9488d89425f91e2a49afe0..ca29ec00dc188f7b2ab3a5021ed9ad6e4a8cb68d 100644 (file)
@@ -19,37 +19,37 @@ MODULE_AUTHOR("Maciej Soltysiak <solt@dns.toxicfilms.tv>");
 MODULE_DESCRIPTION("IP tables Hop Limit matching module");
 MODULE_LICENSE("GPL");
 
-static int match(const struct sk_buff *skb,
-                const struct net_device *in, const struct net_device *out,
-                const struct xt_match *match, const void *matchinfo,
-                int offset, unsigned int protoff, bool *hotdrop)
+static bool match(const struct sk_buff *skb,
+                 const struct net_device *in, const struct net_device *out,
+                 const struct xt_match *match, const void *matchinfo,
+                 int offset, unsigned int protoff, bool *hotdrop)
 {
        const struct ip6t_hl_info *info = matchinfo;
        const struct ipv6hdr *ip6h = ipv6_hdr(skb);
 
        switch (info->mode) {
                case IP6T_HL_EQ:
-                       return (ip6h->hop_limit == info->hop_limit);
+                       return ip6h->hop_limit == info->hop_limit;
                        break;
                case IP6T_HL_NE:
-                       return (!(ip6h->hop_limit == info->hop_limit));
+                       return ip6h->hop_limit != info->hop_limit;
                        break;
                case IP6T_HL_LT:
-                       return (ip6h->hop_limit < info->hop_limit);
+                       return ip6h->hop_limit < info->hop_limit;
                        break;
                case IP6T_HL_GT:
-                       return (ip6h->hop_limit > info->hop_limit);
+                       return ip6h->hop_limit > info->hop_limit;
                        break;
                default:
                        printk(KERN_WARNING "ip6t_hl: unknown mode %d\n",
                                info->mode);
-                       return 0;
+                       return false;
        }
 
-       return 0;
+       return false;
 }
 
-static struct xt_match hl_match = {
+static struct xt_match hl_match __read_mostly = {
        .name           = "hl",
        .family         = AF_INET6,
        .match          = match,