[NETFILTER]: x_tables: switch hotdrop to bool
authorJan Engelhardt <jengelh@gmx.de>
Sun, 8 Jul 2007 05:15:12 +0000 (22:15 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 11 Jul 2007 05:16:56 +0000 (22:16 -0700)
Switch the "hotdrop" variables to boolean

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
46 files changed:
include/linux/netfilter/x_tables.h
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/ipt_addrtype.c
net/ipv4/netfilter/ipt_ah.c
net/ipv4/netfilter/ipt_ecn.c
net/ipv4/netfilter/ipt_iprange.c
net/ipv4/netfilter/ipt_owner.c
net/ipv4/netfilter/ipt_recent.c
net/ipv4/netfilter/ipt_tos.c
net/ipv4/netfilter/ipt_ttl.c
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6t_ah.c
net/ipv6/netfilter/ip6t_eui64.c
net/ipv6/netfilter/ip6t_frag.c
net/ipv6/netfilter/ip6t_hbh.c
net/ipv6/netfilter/ip6t_hl.c
net/ipv6/netfilter/ip6t_ipv6header.c
net/ipv6/netfilter/ip6t_mh.c
net/ipv6/netfilter/ip6t_owner.c
net/ipv6/netfilter/ip6t_rt.c
net/netfilter/xt_comment.c
net/netfilter/xt_connbytes.c
net/netfilter/xt_connmark.c
net/netfilter/xt_conntrack.c
net/netfilter/xt_dccp.c
net/netfilter/xt_dscp.c
net/netfilter/xt_esp.c
net/netfilter/xt_hashlimit.c
net/netfilter/xt_helper.c
net/netfilter/xt_length.c
net/netfilter/xt_limit.c
net/netfilter/xt_mac.c
net/netfilter/xt_mark.c
net/netfilter/xt_multiport.c
net/netfilter/xt_physdev.c
net/netfilter/xt_pkttype.c
net/netfilter/xt_policy.c
net/netfilter/xt_quota.c
net/netfilter/xt_realm.c
net/netfilter/xt_sctp.c
net/netfilter/xt_state.c
net/netfilter/xt_statistic.c
net/netfilter/xt_string.c
net/netfilter/xt_tcpmss.c
net/netfilter/xt_tcpudp.c

index 7e733a6..b8577d1 100644 (file)
@@ -148,7 +148,7 @@ struct xt_match
                     const void *matchinfo,
                     int offset,
                     unsigned int protoff,
                     const void *matchinfo,
                     int offset,
                     unsigned int protoff,
-                    int *hotdrop);
+                    bool *hotdrop);
 
        /* Called when user tries to insert an entry of this type. */
        /* Should return true or false. */
 
        /* Called when user tries to insert an entry of this type. */
        /* Should return true or false. */
index cae4121..1d75a5c 100644 (file)
@@ -224,7 +224,7 @@ unsigned int arpt_do_table(struct sk_buff **pskb,
        static const char nulldevname[IFNAMSIZ];
        unsigned int verdict = NF_DROP;
        struct arphdr *arp;
        static const char nulldevname[IFNAMSIZ];
        unsigned int verdict = NF_DROP;
        struct arphdr *arp;
-       int hotdrop = 0;
+       bool hotdrop = false;
        struct arpt_entry *e, *back;
        const char *indev, *outdev;
        void *table_base;
        struct arpt_entry *e, *back;
        const char *indev, *outdev;
        void *table_base;
index 9bacf1a..e2a8938 100644 (file)
@@ -188,7 +188,7 @@ int do_match(struct ipt_entry_match *m,
             const struct net_device *in,
             const struct net_device *out,
             int offset,
             const struct net_device *in,
             const struct net_device *out,
             int offset,
-            int *hotdrop)
+            bool *hotdrop)
 {
        /* Stop iteration if it doesn't match */
        if (!m->u.kernel.match->match(skb, in, out, m->u.kernel.match, m->data,
 {
        /* Stop iteration if it doesn't match */
        if (!m->u.kernel.match->match(skb, in, out, m->u.kernel.match, m->data,
@@ -216,7 +216,7 @@ ipt_do_table(struct sk_buff **pskb,
        u_int16_t offset;
        struct iphdr *ip;
        u_int16_t datalen;
        u_int16_t offset;
        struct iphdr *ip;
        u_int16_t datalen;
-       int hotdrop = 0;
+       bool hotdrop = false;
        /* Initializing verdict to NF_DROP keeps gcc happy. */
        unsigned int verdict = NF_DROP;
        const char *indev, *outdev;
        /* Initializing verdict to NF_DROP keeps gcc happy. */
        unsigned int verdict = NF_DROP;
        const char *indev, *outdev;
@@ -2122,7 +2122,7 @@ icmp_match(const struct sk_buff *skb,
           const void *matchinfo,
           int offset,
           unsigned int protoff,
           const void *matchinfo,
           int offset,
           unsigned int protoff,
-          int *hotdrop)
+          bool *hotdrop)
 {
        struct icmphdr _icmph, *ic;
        const struct ipt_icmp *icmpinfo = matchinfo;
 {
        struct icmphdr _icmph, *ic;
        const struct ipt_icmp *icmpinfo = matchinfo;
@@ -2137,7 +2137,7 @@ icmp_match(const struct sk_buff *skb,
                 * can't.  Hence, no choice but to drop.
                 */
                duprintf("Dropping evil ICMP tinygram.\n");
                 * can't.  Hence, no choice but to drop.
                 */
                duprintf("Dropping evil ICMP tinygram.\n");
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
index a652a14..a9a9b75 100644 (file)
@@ -30,7 +30,7 @@ static inline int match_type(__be32 addr, u_int16_t mask)
 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,
 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, int *hotdrop)
+                int offset, unsigned int protoff, bool *hotdrop)
 {
        const struct ipt_addrtype_info *info = matchinfo;
        const struct iphdr *iph = ip_hdr(skb);
 {
        const struct ipt_addrtype_info *info = matchinfo;
        const struct iphdr *iph = ip_hdr(skb);
index 18a1678..9a244e4 100644 (file)
@@ -44,7 +44,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        struct ip_auth_hdr _ahdr, *ah;
        const struct ipt_ah *ahinfo = matchinfo;
 {
        struct ip_auth_hdr _ahdr, *ah;
        const struct ipt_ah *ahinfo = matchinfo;
@@ -60,7 +60,7 @@ match(const struct sk_buff *skb,
                 * can't.  Hence, no choice but to drop.
                 */
                duprintf("Dropping evil AH tinygram.\n");
                 * can't.  Hence, no choice but to drop.
                 */
                duprintf("Dropping evil AH tinygram.\n");
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
index 2621812..a47f374 100644 (file)
@@ -30,7 +30,7 @@ static inline int match_ip(const struct sk_buff *skb,
 
 static inline int match_tcp(const struct sk_buff *skb,
                            const struct ipt_ecn_info *einfo,
 
 static inline int match_tcp(const struct sk_buff *skb,
                            const struct ipt_ecn_info *einfo,
-                           int *hotdrop)
+                           bool *hotdrop)
 {
        struct tcphdr _tcph, *th;
 
 {
        struct tcphdr _tcph, *th;
 
@@ -39,7 +39,7 @@ static inline int match_tcp(const struct sk_buff *skb,
         */
        th = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(_tcph), &_tcph);
        if (th == NULL) {
         */
        th = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(_tcph), &_tcph);
        if (th == NULL) {
-               *hotdrop = 0;
+               *hotdrop = false;
                return 0;
        }
 
                return 0;
        }
 
@@ -69,7 +69,7 @@ static inline int match_tcp(const struct sk_buff *skb,
 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,
 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, int *hotdrop)
+                int offset, unsigned int protoff, bool *hotdrop)
 {
        const struct ipt_ecn_info *info = matchinfo;
 
 {
        const struct ipt_ecn_info *info = matchinfo;
 
index 33af9e9..86f225c 100644 (file)
@@ -29,7 +29,7 @@ match(const struct sk_buff *skb,
       const struct net_device *out,
       const struct xt_match *match,
       const void *matchinfo,
       const struct net_device *out,
       const struct xt_match *match,
       const void *matchinfo,
-      int offset, unsigned int protoff, int *hotdrop)
+      int offset, unsigned int protoff, bool *hotdrop)
 {
        const struct ipt_iprange_info *info = matchinfo;
        const struct iphdr *iph = ip_hdr(skb);
 {
        const struct ipt_iprange_info *info = matchinfo;
        const struct iphdr *iph = ip_hdr(skb);
index 7fae9aa..92be562 100644 (file)
@@ -29,7 +29,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct ipt_owner_info *info = matchinfo;
 
 {
        const struct ipt_owner_info *info = matchinfo;
 
index 15a9e8b..81f1a01 100644 (file)
@@ -173,7 +173,7 @@ static int
 ipt_recent_match(const struct sk_buff *skb,
                 const struct net_device *in, const struct net_device *out,
                 const struct xt_match *match, const void *matchinfo,
 ipt_recent_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, int *hotdrop)
+                int offset, unsigned int protoff, bool *hotdrop)
 {
        const struct ipt_recent_info *info = matchinfo;
        struct recent_table *t;
 {
        const struct ipt_recent_info *info = matchinfo;
        struct recent_table *t;
@@ -201,7 +201,7 @@ ipt_recent_match(const struct sk_buff *skb,
                        goto out;
                e = recent_entry_init(t, addr, ttl);
                if (e == NULL)
                        goto out;
                e = recent_entry_init(t, addr, ttl);
                if (e == NULL)
-                       *hotdrop = 1;
+                       *hotdrop = true;
                ret ^= 1;
                goto out;
        }
                ret ^= 1;
                goto out;
        }
index d314844..803ed4c 100644 (file)
@@ -26,7 +26,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct ipt_tos_info *info = matchinfo;
 
 {
        const struct ipt_tos_info *info = matchinfo;
 
index ab02d9e..e7316b2 100644 (file)
@@ -21,7 +21,7 @@ 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,
 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, int *hotdrop)
+                int offset, unsigned int protoff, bool *hotdrop)
 {
        const struct ipt_ttl_info *info = matchinfo;
        const u8 ttl = ip_hdr(skb)->ttl;
 {
        const struct ipt_ttl_info *info = matchinfo;
        const u8 ttl = ip_hdr(skb)->ttl;
index 9aa6240..13c66a7 100644 (file)
@@ -102,7 +102,7 @@ ip6_packet_match(const struct sk_buff *skb,
                 const char *outdev,
                 const struct ip6t_ip6 *ip6info,
                 unsigned int *protoff,
                 const char *outdev,
                 const struct ip6t_ip6 *ip6info,
                 unsigned int *protoff,
-                int *fragoff, int *hotdrop)
+                int *fragoff, bool *hotdrop)
 {
        size_t i;
        unsigned long ret;
 {
        size_t i;
        unsigned long ret;
@@ -162,7 +162,7 @@ ip6_packet_match(const struct sk_buff *skb,
                protohdr = ipv6_find_hdr(skb, protoff, -1, &_frag_off);
                if (protohdr < 0) {
                        if (_frag_off == 0)
                protohdr = ipv6_find_hdr(skb, protoff, -1, &_frag_off);
                if (protohdr < 0) {
                        if (_frag_off == 0)
-                               *hotdrop = 1;
+                               *hotdrop = true;
                        return 0;
                }
                *fragoff = _frag_off;
                        return 0;
                }
                *fragoff = _frag_off;
@@ -225,7 +225,7 @@ int do_match(struct ip6t_entry_match *m,
             const struct net_device *out,
             int offset,
             unsigned int protoff,
             const struct net_device *out,
             int offset,
             unsigned int protoff,
-            int *hotdrop)
+            bool *hotdrop)
 {
        /* Stop iteration if it doesn't match */
        if (!m->u.kernel.match->match(skb, in, out, m->u.kernel.match, m->data,
 {
        /* Stop iteration if it doesn't match */
        if (!m->u.kernel.match->match(skb, in, out, m->u.kernel.match, m->data,
@@ -252,7 +252,7 @@ ip6t_do_table(struct sk_buff **pskb,
        static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
        int offset = 0;
        unsigned int protoff = 0;
        static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
        int offset = 0;
        unsigned int protoff = 0;
-       int hotdrop = 0;
+       bool hotdrop = false;
        /* Initializing verdict to NF_DROP keeps gcc happy. */
        unsigned int verdict = NF_DROP;
        const char *indev, *outdev;
        /* Initializing verdict to NF_DROP keeps gcc happy. */
        unsigned int verdict = NF_DROP;
        const char *indev, *outdev;
@@ -1299,7 +1299,7 @@ icmp6_match(const struct sk_buff *skb,
           const void *matchinfo,
           int offset,
           unsigned int protoff,
           const void *matchinfo,
           int offset,
           unsigned int protoff,
-          int *hotdrop)
+          bool *hotdrop)
 {
        struct icmp6hdr _icmp, *ic;
        const struct ip6t_icmp *icmpinfo = matchinfo;
 {
        struct icmp6hdr _icmp, *ic;
        const struct ip6t_icmp *icmpinfo = matchinfo;
@@ -1313,7 +1313,7 @@ icmp6_match(const struct sk_buff *skb,
                /* We've been asked to examine this packet, and we
                   can't.  Hence, no choice but to drop. */
                duprintf("Dropping evil ICMP tinygram.\n");
                /* We've been asked to examine this packet, and we
                   can't.  Hence, no choice but to drop. */
                duprintf("Dropping evil ICMP tinygram.\n");
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
index d3c1543..27b7bd2 100644 (file)
@@ -49,7 +49,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        struct ip_auth_hdr *ah, _ah;
        const struct ip6t_ah *ahinfo = matchinfo;
 {
        struct ip_auth_hdr *ah, _ah;
        const struct ip6t_ah *ahinfo = matchinfo;
@@ -60,13 +60,13 @@ match(const struct sk_buff *skb,
        err = ipv6_find_hdr(skb, &ptr, NEXTHDR_AUTH, NULL);
        if (err < 0) {
                if (err != -ENOENT)
        err = ipv6_find_hdr(skb, &ptr, NEXTHDR_AUTH, NULL);
        if (err < 0) {
                if (err != -ENOENT)
-                       *hotdrop = 1;
+                       *hotdrop = true;
                return 0;
        }
 
        ah = skb_header_pointer(skb, ptr, sizeof(_ah), &_ah);
        if (ah == NULL) {
                return 0;
        }
 
        ah = skb_header_pointer(skb, ptr, sizeof(_ah), &_ah);
        if (ah == NULL) {
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
index 0f3dd93..69e79e1 100644 (file)
@@ -27,7 +27,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        unsigned char eui64[8];
        int i = 0;
 {
        unsigned char eui64[8];
        int i = 0;
@@ -35,7 +35,7 @@ match(const struct sk_buff *skb,
        if (!(skb_mac_header(skb) >= skb->head &&
              (skb_mac_header(skb) + ETH_HLEN) <= skb->data) &&
            offset != 0) {
        if (!(skb_mac_header(skb) >= skb->head &&
              (skb_mac_header(skb) + ETH_HLEN) <= skb->data) &&
            offset != 0) {
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
index 5a5da71..740fdca 100644 (file)
@@ -48,7 +48,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        struct frag_hdr _frag, *fh;
        const struct ip6t_frag *fraginfo = matchinfo;
 {
        struct frag_hdr _frag, *fh;
        const struct ip6t_frag *fraginfo = matchinfo;
@@ -58,13 +58,13 @@ match(const struct sk_buff *skb,
        err = ipv6_find_hdr(skb, &ptr, NEXTHDR_FRAGMENT, NULL);
        if (err < 0) {
                if (err != -ENOENT)
        err = ipv6_find_hdr(skb, &ptr, NEXTHDR_FRAGMENT, NULL);
        if (err < 0) {
                if (err != -ENOENT)
-                       *hotdrop = 1;
+                       *hotdrop = true;
                return 0;
        }
 
        fh = skb_header_pointer(skb, ptr, sizeof(_frag), &_frag);
        if (fh == NULL) {
                return 0;
        }
 
        fh = skb_header_pointer(skb, ptr, sizeof(_frag), &_frag);
        if (fh == NULL) {
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
index d2373c7..5633de1 100644 (file)
@@ -55,7 +55,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        struct ipv6_opt_hdr _optsh, *oh;
        const struct ip6t_opts *optinfo = matchinfo;
 {
        struct ipv6_opt_hdr _optsh, *oh;
        const struct ip6t_opts *optinfo = matchinfo;
@@ -71,13 +71,13 @@ match(const struct sk_buff *skb,
        err = ipv6_find_hdr(skb, &ptr, match->data, NULL);
        if (err < 0) {
                if (err != -ENOENT)
        err = ipv6_find_hdr(skb, &ptr, match->data, NULL);
        if (err < 0) {
                if (err != -ENOENT)
-                       *hotdrop = 1;
+                       *hotdrop = true;
                return 0;
        }
 
        oh = skb_header_pointer(skb, ptr, sizeof(_optsh), &_optsh);
        if (oh == NULL) {
                return 0;
        }
 
        oh = skb_header_pointer(skb, ptr, sizeof(_optsh), &_optsh);
        if (oh == NULL) {
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
index d606c0e..cbf49cf 100644 (file)
@@ -22,7 +22,7 @@ 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,
 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, int *hotdrop)
+                int offset, unsigned int protoff, bool *hotdrop)
 {
        const struct ip6t_hl_info *info = matchinfo;
        const struct ipv6hdr *ip6h = ipv6_hdr(skb);
 {
        const struct ip6t_hl_info *info = matchinfo;
        const struct ipv6hdr *ip6h = ipv6_hdr(skb);
index fd6a086..469dec2 100644 (file)
@@ -34,7 +34,7 @@ ipv6header_match(const struct sk_buff *skb,
                 const void *matchinfo,
                 int offset,
                 unsigned int protoff,
                 const void *matchinfo,
                 int offset,
                 unsigned int protoff,
-                int *hotdrop)
+                bool *hotdrop)
 {
        const struct ip6t_ipv6header_info *info = matchinfo;
        unsigned int temp;
 {
        const struct ip6t_ipv6header_info *info = matchinfo;
        unsigned int temp;
index c2a9098..c27647b 100644 (file)
@@ -48,7 +48,7 @@ match(const struct sk_buff *skb,
         const void *matchinfo,
         int offset,
         unsigned int protoff,
         const void *matchinfo,
         int offset,
         unsigned int protoff,
-        int *hotdrop)
+        bool *hotdrop)
 {
        struct ip6_mh _mh, *mh;
        const struct ip6t_mh *mhinfo = matchinfo;
 {
        struct ip6_mh _mh, *mh;
        const struct ip6t_mh *mhinfo = matchinfo;
@@ -62,14 +62,14 @@ match(const struct sk_buff *skb,
                /* We've been asked to examine this packet, and we
                   can't.  Hence, no choice but to drop. */
                duprintf("Dropping evil MH tinygram.\n");
                /* We've been asked to examine this packet, and we
                   can't.  Hence, no choice but to drop. */
                duprintf("Dropping evil MH tinygram.\n");
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
        if (mh->ip6mh_proto != IPPROTO_NONE) {
                duprintf("Dropping invalid MH Payload Proto: %u\n",
                         mh->ip6mh_proto);
                return 0;
        }
 
        if (mh->ip6mh_proto != IPPROTO_NONE) {
                duprintf("Dropping invalid MH Payload Proto: %u\n",
                         mh->ip6mh_proto);
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
index 43738bb..f90f7c3 100644 (file)
@@ -31,7 +31,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct ip6t_owner_info *info = matchinfo;
 
 {
        const struct ip6t_owner_info *info = matchinfo;
 
index 81ab00d..2bb8821 100644 (file)
@@ -50,7 +50,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        struct ipv6_rt_hdr _route, *rh;
        const struct ip6t_rt *rtinfo = matchinfo;
 {
        struct ipv6_rt_hdr _route, *rh;
        const struct ip6t_rt *rtinfo = matchinfo;
@@ -64,13 +64,13 @@ match(const struct sk_buff *skb,
        err = ipv6_find_hdr(skb, &ptr, NEXTHDR_ROUTING, NULL);
        if (err < 0) {
                if (err != -ENOENT)
        err = ipv6_find_hdr(skb, &ptr, NEXTHDR_ROUTING, NULL);
        if (err < 0) {
                if (err != -ENOENT)
-                       *hotdrop = 1;
+                       *hotdrop = true;
                return 0;
        }
 
        rh = skb_header_pointer(skb, ptr, sizeof(_route), &_route);
        if (rh == NULL) {
                return 0;
        }
 
        rh = skb_header_pointer(skb, ptr, sizeof(_route), &_route);
        if (rh == NULL) {
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
index 7db492d..20690ea 100644 (file)
@@ -23,7 +23,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protooff,
       const void *matchinfo,
       int offset,
       unsigned int protooff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        /* We always match */
        return 1;
 {
        /* We always match */
        return 1;
index 804afe5..8fe5775 100644 (file)
@@ -23,7 +23,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct xt_connbytes_info *sinfo = matchinfo;
        struct nf_conn *ct;
 {
        const struct xt_connbytes_info *sinfo = matchinfo;
        struct nf_conn *ct;
index e180325..8a6d58a 100644 (file)
@@ -38,7 +38,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct xt_connmark_info *info = matchinfo;
        struct nf_conn *ct;
 {
        const struct xt_connmark_info *info = matchinfo;
        struct nf_conn *ct;
index 189ded5..915c730 100644 (file)
@@ -27,7 +27,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct xt_conntrack_info *sinfo = matchinfo;
        struct nf_conn *ct;
 {
        const struct xt_conntrack_info *sinfo = matchinfo;
        struct nf_conn *ct;
index 2c9c0de..3172e73 100644 (file)
@@ -36,7 +36,7 @@ dccp_find_option(u_int8_t option,
                 const struct sk_buff *skb,
                 unsigned int protoff,
                 const struct dccp_hdr *dh,
                 const struct sk_buff *skb,
                 unsigned int protoff,
                 const struct dccp_hdr *dh,
-                int *hotdrop)
+                bool *hotdrop)
 {
        /* tcp.doff is only 4 bits, ie. max 15 * 4 bytes */
        unsigned char *op;
 {
        /* tcp.doff is only 4 bits, ie. max 15 * 4 bytes */
        unsigned char *op;
@@ -45,7 +45,7 @@ dccp_find_option(u_int8_t option,
        unsigned int i;
 
        if (dh->dccph_doff * 4 < __dccp_hdr_len(dh)) {
        unsigned int i;
 
        if (dh->dccph_doff * 4 < __dccp_hdr_len(dh)) {
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
@@ -57,7 +57,7 @@ dccp_find_option(u_int8_t option,
        if (op == NULL) {
                /* If we don't have the whole header, drop packet. */
                spin_unlock_bh(&dccp_buflock);
        if (op == NULL) {
                /* If we don't have the whole header, drop packet. */
                spin_unlock_bh(&dccp_buflock);
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
@@ -86,7 +86,7 @@ match_types(const struct dccp_hdr *dh, u_int16_t typemask)
 
 static inline int
 match_option(u_int8_t option, const struct sk_buff *skb, unsigned int protoff,
 
 static inline int
 match_option(u_int8_t option, const struct sk_buff *skb, unsigned int protoff,
-            const struct dccp_hdr *dh, int *hotdrop)
+            const struct dccp_hdr *dh, bool *hotdrop)
 {
        return dccp_find_option(option, skb, protoff, dh, hotdrop);
 }
 {
        return dccp_find_option(option, skb, protoff, dh, hotdrop);
 }
@@ -99,7 +99,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct xt_dccp_info *info = matchinfo;
        struct dccp_hdr _dh, *dh;
 {
        const struct xt_dccp_info *info = matchinfo;
        struct dccp_hdr _dh, *dh;
@@ -109,7 +109,7 @@ match(const struct sk_buff *skb,
 
        dh = skb_header_pointer(skb, protoff, sizeof(_dh), &_dh);
        if (dh == NULL) {
 
        dh = skb_header_pointer(skb, protoff, sizeof(_dh), &_dh);
        if (dh == NULL) {
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
index 56b247e..c106d73 100644 (file)
@@ -29,7 +29,7 @@ static int match(const struct sk_buff *skb,
                 const void *matchinfo,
                 int offset,
                 unsigned int protoff,
                 const void *matchinfo,
                 int offset,
                 unsigned int protoff,
-                int *hotdrop)
+                bool *hotdrop)
 {
        const struct xt_dscp_info *info = matchinfo;
        u_int8_t dscp = ipv4_get_dsfield(ip_hdr(skb)) >> XT_DSCP_SHIFT;
 {
        const struct xt_dscp_info *info = matchinfo;
        u_int8_t dscp = ipv4_get_dsfield(ip_hdr(skb)) >> XT_DSCP_SHIFT;
@@ -44,7 +44,7 @@ static int match6(const struct sk_buff *skb,
                  const void *matchinfo,
                  int offset,
                  unsigned int protoff,
                  const void *matchinfo,
                  int offset,
                  unsigned int protoff,
-                 int *hotdrop)
+                 bool *hotdrop)
 {
        const struct xt_dscp_info *info = matchinfo;
        u_int8_t dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> XT_DSCP_SHIFT;
 {
        const struct xt_dscp_info *info = matchinfo;
        u_int8_t dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> XT_DSCP_SHIFT;
index 7c95f14..5d3421b 100644 (file)
@@ -50,7 +50,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        struct ip_esp_hdr _esp, *eh;
        const struct xt_esp *espinfo = matchinfo;
 {
        struct ip_esp_hdr _esp, *eh;
        const struct xt_esp *espinfo = matchinfo;
@@ -65,7 +65,7 @@ match(const struct sk_buff *skb,
                 * can't.  Hence, no choice but to drop.
                 */
                duprintf("Dropping evil ESP tinygram.\n");
                 * can't.  Hence, no choice but to drop.
                 */
                duprintf("Dropping evil ESP tinygram.\n");
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
index d3043fa..cd5cba6 100644 (file)
@@ -440,7 +440,7 @@ hashlimit_match(const struct sk_buff *skb,
                const void *matchinfo,
                int offset,
                unsigned int protoff,
                const void *matchinfo,
                int offset,
                unsigned int protoff,
-               int *hotdrop)
+               bool *hotdrop)
 {
        struct xt_hashlimit_info *r =
                ((struct xt_hashlimit_info *)matchinfo)->u.master;
 {
        struct xt_hashlimit_info *r =
                ((struct xt_hashlimit_info *)matchinfo)->u.master;
@@ -487,7 +487,7 @@ hashlimit_match(const struct sk_buff *skb,
        return 0;
 
 hotdrop:
        return 0;
 
 hotdrop:
-       *hotdrop = 1;
+       *hotdrop = true;
        return 0;
 }
 
        return 0;
 }
 
index c139b2f..0aa0907 100644 (file)
@@ -36,7 +36,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct xt_helper_info *info = matchinfo;
        struct nf_conn *ct;
 {
        const struct xt_helper_info *info = matchinfo;
        struct nf_conn *ct;
index 77288c5..621c9ee 100644 (file)
@@ -28,7 +28,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct xt_length_info *info = matchinfo;
        u_int16_t pktlen = ntohs(ip_hdr(skb)->tot_len);
 {
        const struct xt_length_info *info = matchinfo;
        u_int16_t pktlen = ntohs(ip_hdr(skb)->tot_len);
@@ -44,7 +44,7 @@ match6(const struct sk_buff *skb,
        const void *matchinfo,
        int offset,
        unsigned int protoff,
        const void *matchinfo,
        int offset,
        unsigned int protoff,
-       int *hotdrop)
+       bool *hotdrop)
 {
        const struct xt_length_info *info = matchinfo;
        const u_int16_t pktlen = (ntohs(ipv6_hdr(skb)->payload_len) +
 {
        const struct xt_length_info *info = matchinfo;
        const u_int16_t pktlen = (ntohs(ipv6_hdr(skb)->payload_len) +
index 571a72a..1133b4c 100644 (file)
@@ -65,7 +65,7 @@ ipt_limit_match(const struct sk_buff *skb,
                const void *matchinfo,
                int offset,
                unsigned int protoff,
                const void *matchinfo,
                int offset,
                unsigned int protoff,
-               int *hotdrop)
+               bool *hotdrop)
 {
        struct xt_rateinfo *r = ((struct xt_rateinfo *)matchinfo)->master;
        unsigned long now = jiffies;
 {
        struct xt_rateinfo *r = ((struct xt_rateinfo *)matchinfo)->master;
        unsigned long now = jiffies;
index 1d3a1d9..0e6a286 100644 (file)
@@ -32,7 +32,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
     const struct xt_mac_info *info = matchinfo;
 
 {
     const struct xt_mac_info *info = matchinfo;
 
index 39911dd..944d1ea 100644 (file)
@@ -27,7 +27,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct xt_mark_info *info = matchinfo;
 
 {
        const struct xt_mark_info *info = matchinfo;
 
index 4dce2a8..1dc53de 100644 (file)
@@ -102,7 +102,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        __be16 _ports[2], *pptr;
        const struct xt_multiport *multiinfo = matchinfo;
 {
        __be16 _ports[2], *pptr;
        const struct xt_multiport *multiinfo = matchinfo;
@@ -116,7 +116,7 @@ match(const struct sk_buff *skb,
                 * can't.  Hence, no choice but to drop.
                 */
                duprintf("xt_multiport: Dropping evil offset=0 tinygram.\n");
                 * can't.  Hence, no choice but to drop.
                 */
                duprintf("xt_multiport: Dropping evil offset=0 tinygram.\n");
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
@@ -133,7 +133,7 @@ match_v1(const struct sk_buff *skb,
         const void *matchinfo,
         int offset,
         unsigned int protoff,
         const void *matchinfo,
         int offset,
         unsigned int protoff,
-        int *hotdrop)
+        bool *hotdrop)
 {
        __be16 _ports[2], *pptr;
        const struct xt_multiport_v1 *multiinfo = matchinfo;
 {
        __be16 _ports[2], *pptr;
        const struct xt_multiport_v1 *multiinfo = matchinfo;
@@ -147,7 +147,7 @@ match_v1(const struct sk_buff *skb,
                 * can't.  Hence, no choice but to drop.
                 */
                duprintf("xt_multiport: Dropping evil offset=0 tinygram.\n");
                 * can't.  Hence, no choice but to drop.
                 */
                duprintf("xt_multiport: Dropping evil offset=0 tinygram.\n");
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
index 35a0fe2..a6de512 100644 (file)
@@ -31,7 +31,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        int i;
        static const char nulldevname[IFNAMSIZ];
 {
        int i;
        static const char nulldevname[IFNAMSIZ];
index e1409fc..692581f 100644 (file)
@@ -28,7 +28,7 @@ static int match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        u_int8_t type;
        const struct xt_pkttype_info *info = matchinfo;
 {
        u_int8_t type;
        const struct xt_pkttype_info *info = matchinfo;
index 15b45a9..6878482 100644 (file)
@@ -115,7 +115,7 @@ static int match(const struct sk_buff *skb,
                 const void *matchinfo,
                 int offset,
                 unsigned int protoff,
                 const void *matchinfo,
                 int offset,
                 unsigned int protoff,
-                int *hotdrop)
+                bool *hotdrop)
 {
        const struct xt_policy_info *info = matchinfo;
        int ret;
 {
        const struct xt_policy_info *info = matchinfo;
        int ret;
index bfdde06..53c71ac 100644 (file)
@@ -20,7 +20,7 @@ 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,
 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, int *hotdrop)
+      int offset, unsigned int protoff, bool *hotdrop)
 {
        struct xt_quota_info *q = ((struct xt_quota_info *)matchinfo)->master;
        int ret = q->flags & XT_QUOTA_INVERT ? 1 : 0;
 {
        struct xt_quota_info *q = ((struct xt_quota_info *)matchinfo)->master;
        int ret = q->flags & XT_QUOTA_INVERT ? 1 : 0;
index c2017f8..41451f5 100644 (file)
@@ -29,7 +29,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct xt_realm_info *info = matchinfo;
        struct dst_entry *dst = skb->dst;
 {
        const struct xt_realm_info *info = matchinfo;
        struct dst_entry *dst = skb->dst;
index f86d8d7..e581afe 100644 (file)
@@ -47,7 +47,7 @@ match_packet(const struct sk_buff *skb,
             int chunk_match_type,
             const struct xt_sctp_flag_info *flag_info,
             const int flag_count,
             int chunk_match_type,
             const struct xt_sctp_flag_info *flag_info,
             const int flag_count,
-            int *hotdrop)
+            bool *hotdrop)
 {
        u_int32_t chunkmapcopy[256 / sizeof (u_int32_t)];
        sctp_chunkhdr_t _sch, *sch;
 {
        u_int32_t chunkmapcopy[256 / sizeof (u_int32_t)];
        sctp_chunkhdr_t _sch, *sch;
@@ -64,7 +64,7 @@ match_packet(const struct sk_buff *skb,
                sch = skb_header_pointer(skb, offset, sizeof(_sch), &_sch);
                if (sch == NULL || sch->length == 0) {
                        duprintf("Dropping invalid SCTP packet.\n");
                sch = skb_header_pointer(skb, offset, sizeof(_sch), &_sch);
                if (sch == NULL || sch->length == 0) {
                        duprintf("Dropping invalid SCTP packet.\n");
-                       *hotdrop = 1;
+                       *hotdrop = true;
                        return 0;
                }
 
                        return 0;
                }
 
@@ -127,7 +127,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct xt_sctp_info *info = matchinfo;
        sctp_sctphdr_t _sh, *sh;
 {
        const struct xt_sctp_info *info = matchinfo;
        sctp_sctphdr_t _sh, *sh;
@@ -140,7 +140,7 @@ match(const struct sk_buff *skb,
        sh = skb_header_pointer(skb, protoff, sizeof(_sh), &_sh);
        if (sh == NULL) {
                duprintf("Dropping evil TCP offset=0 tinygram.\n");
        sh = skb_header_pointer(skb, protoff, sizeof(_sh), &_sh);
        if (sh == NULL) {
                duprintf("Dropping evil TCP offset=0 tinygram.\n");
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
        duprintf("spt: %d\tdpt: %d\n", ntohs(sh->source), ntohs(sh->dest));
                return 0;
        }
        duprintf("spt: %d\tdpt: %d\n", ntohs(sh->source), ntohs(sh->dest));
index 149294f..74fe069 100644 (file)
@@ -28,7 +28,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct xt_state_info *sinfo = matchinfo;
        enum ip_conntrack_info ctinfo;
 {
        const struct xt_state_info *sinfo = matchinfo;
        enum ip_conntrack_info ctinfo;
index 091a9f8..4e5ed81 100644 (file)
@@ -28,7 +28,7 @@ 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,
 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, int *hotdrop)
+      int offset, unsigned int protoff, bool *hotdrop)
 {
        struct xt_statistic_info *info = (struct xt_statistic_info *)matchinfo;
        int ret = info->flags & XT_STATISTIC_INVERT ? 1 : 0;
 {
        struct xt_statistic_info *info = (struct xt_statistic_info *)matchinfo;
        int ret = info->flags & XT_STATISTIC_INVERT ? 1 : 0;
index 999a005..7552d89 100644 (file)
@@ -28,7 +28,7 @@ static int match(const struct sk_buff *skb,
                 const void *matchinfo,
                 int offset,
                 unsigned int protoff,
                 const void *matchinfo,
                 int offset,
                 unsigned int protoff,
-                int *hotdrop)
+                bool *hotdrop)
 {
        const struct xt_string_info *conf = matchinfo;
        struct ts_state state;
 {
        const struct xt_string_info *conf = matchinfo;
        struct ts_state state;
index 80571d0..0db4f53 100644 (file)
@@ -31,7 +31,7 @@ match(const struct sk_buff *skb,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
-      int *hotdrop)
+      bool *hotdrop)
 {
        const struct xt_tcpmss_match_info *info = matchinfo;
        struct tcphdr _tcph, *th;
 {
        const struct xt_tcpmss_match_info *info = matchinfo;
        struct tcphdr _tcph, *th;
@@ -77,7 +77,7 @@ out:
        return info->invert;
 
 dropit:
        return info->invert;
 
 dropit:
-       *hotdrop = 1;
+       *hotdrop = true;
        return 0;
 }
 
        return 0;
 }
 
index 46414b5..ca9ccdd 100644 (file)
@@ -42,7 +42,7 @@ tcp_find_option(u_int8_t option,
                unsigned int protoff,
                unsigned int optlen,
                int invert,
                unsigned int protoff,
                unsigned int optlen,
                int invert,
-               int *hotdrop)
+               bool *hotdrop)
 {
        /* tcp.doff is only 4 bits, ie. max 15 * 4 bytes */
        u_int8_t _opt[60 - sizeof(struct tcphdr)], *op;
 {
        /* tcp.doff is only 4 bits, ie. max 15 * 4 bytes */
        u_int8_t _opt[60 - sizeof(struct tcphdr)], *op;
@@ -57,7 +57,7 @@ tcp_find_option(u_int8_t option,
        op = skb_header_pointer(skb, protoff + sizeof(struct tcphdr),
                                optlen, _opt);
        if (op == NULL) {
        op = skb_header_pointer(skb, protoff + sizeof(struct tcphdr),
                                optlen, _opt);
        if (op == NULL) {
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
@@ -78,7 +78,7 @@ tcp_match(const struct sk_buff *skb,
          const void *matchinfo,
          int offset,
          unsigned int protoff,
          const void *matchinfo,
          int offset,
          unsigned int protoff,
-         int *hotdrop)
+         bool *hotdrop)
 {
        struct tcphdr _tcph, *th;
        const struct xt_tcp *tcpinfo = matchinfo;
 {
        struct tcphdr _tcph, *th;
        const struct xt_tcp *tcpinfo = matchinfo;
@@ -92,7 +92,7 @@ tcp_match(const struct sk_buff *skb,
                */
                if (offset == 1) {
                        duprintf("Dropping evil TCP offset=1 frag.\n");
                */
                if (offset == 1) {
                        duprintf("Dropping evil TCP offset=1 frag.\n");
-                       *hotdrop = 1;
+                       *hotdrop = true;
                }
                /* Must not be a fragment. */
                return 0;
                }
                /* Must not be a fragment. */
                return 0;
@@ -105,7 +105,7 @@ tcp_match(const struct sk_buff *skb,
                /* We've been asked to examine this packet, and we
                   can't.  Hence, no choice but to drop. */
                duprintf("Dropping evil TCP offset=0 tinygram.\n");
                /* We've been asked to examine this packet, and we
                   can't.  Hence, no choice but to drop. */
                duprintf("Dropping evil TCP offset=0 tinygram.\n");
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }
 
@@ -123,7 +123,7 @@ tcp_match(const struct sk_buff *skb,
                return 0;
        if (tcpinfo->option) {
                if (th->doff * 4 < sizeof(_tcph)) {
                return 0;
        if (tcpinfo->option) {
                if (th->doff * 4 < sizeof(_tcph)) {
-                       *hotdrop = 1;
+                       *hotdrop = true;
                        return 0;
                }
                if (!tcp_find_option(tcpinfo->option, skb, protoff,
                        return 0;
                }
                if (!tcp_find_option(tcpinfo->option, skb, protoff,
@@ -157,7 +157,7 @@ udp_match(const struct sk_buff *skb,
          const void *matchinfo,
          int offset,
          unsigned int protoff,
          const void *matchinfo,
          int offset,
          unsigned int protoff,
-         int *hotdrop)
+         bool *hotdrop)
 {
        struct udphdr _udph, *uh;
        const struct xt_udp *udpinfo = matchinfo;
 {
        struct udphdr _udph, *uh;
        const struct xt_udp *udpinfo = matchinfo;
@@ -171,7 +171,7 @@ udp_match(const struct sk_buff *skb,
                /* We've been asked to examine this packet, and we
                   can't.  Hence, no choice but to drop. */
                duprintf("Dropping evil UDP tinygram.\n");
                /* We've been asked to examine this packet, and we
                   can't.  Hence, no choice but to drop. */
                duprintf("Dropping evil UDP tinygram.\n");
-               *hotdrop = 1;
+               *hotdrop = true;
                return 0;
        }
 
                return 0;
        }