]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
netfilter: xtables: change xt_match.checkentry return type
authorJan Engelhardt <jengelh@medozas.de>
Fri, 19 Mar 2010 16:16:42 +0000 (17:16 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Thu, 25 Mar 2010 15:03:13 +0000 (16:03 +0100)
Restore function signatures from bool to int so that we can report
memory allocation failures or similar using -ENOMEM rather than
always having to pass -EINVAL back.

This semantic patch may not be too precise (checking for functions
that use xt_mtchk_param rather than functions referenced by
xt_match.checkentry), but reviewed, it produced the intended result.

// <smpl>
@@
type bool;
identifier check, par;
@@
-bool check
+int check
 (struct xt_mtchk_param *par) { ... }
// </smpl>

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
45 files changed:
include/linux/netfilter/x_tables.h
net/bridge/netfilter/ebt_802_3.c
net/bridge/netfilter/ebt_among.c
net/bridge/netfilter/ebt_arp.c
net/bridge/netfilter/ebt_ip.c
net/bridge/netfilter/ebt_ip6.c
net/bridge/netfilter/ebt_limit.c
net/bridge/netfilter/ebt_mark_m.c
net/bridge/netfilter/ebt_pkttype.c
net/bridge/netfilter/ebt_stp.c
net/bridge/netfilter/ebt_vlan.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/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6t_ah.c
net/ipv6/netfilter/ip6t_frag.c
net/ipv6/netfilter/ip6t_hbh.c
net/ipv6/netfilter/ip6t_ipv6header.c
net/ipv6/netfilter/ip6t_mh.c
net/ipv6/netfilter/ip6t_rt.c
net/netfilter/xt_cluster.c
net/netfilter/xt_connbytes.c
net/netfilter/xt_connlimit.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_limit.c
net/netfilter/xt_multiport.c
net/netfilter/xt_physdev.c
net/netfilter/xt_policy.c
net/netfilter/xt_quota.c
net/netfilter/xt_rateest.c
net/netfilter/xt_recent.c
net/netfilter/xt_sctp.c
net/netfilter/xt_state.c
net/netfilter/xt_statistic.c
net/netfilter/xt_string.c
net/netfilter/xt_tcpudp.c
net/netfilter/xt_time.c

index dd9d15a73a967d05e836e3c3ae4d5db265a6c1ca..33c1a62a0997f7c89674039272c930ac8189c4f0 100644 (file)
@@ -303,7 +303,7 @@ struct xt_match {
                      const struct xt_match_param *);
 
        /* Called when user tries to insert an entry of this type. */
-       bool (*checkentry)(const struct xt_mtchk_param *);
+       int (*checkentry)(const struct xt_mtchk_param *);
 
        /* Called when entry of this type deleted. */
        void (*destroy)(const struct xt_mtdtor_param *);
index 5d1176758ca56ab7b993d086ce92ebbe5166fc6b..7b6f4c4cccb74214b39c9ff75ee1ea55593b6202 100644 (file)
@@ -36,7 +36,7 @@ ebt_802_3_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return true;
 }
 
-static bool ebt_802_3_mt_check(const struct xt_mtchk_param *par)
+static int ebt_802_3_mt_check(const struct xt_mtchk_param *par)
 {
        const struct ebt_802_3_info *info = par->matchinfo;
 
index 60ad6308bc1fca1c9112cf7a5be50da321eeafbe..8a75d399b510e027642620c64f1f9277faf72844 100644 (file)
@@ -172,7 +172,7 @@ ebt_among_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return true;
 }
 
-static bool ebt_among_mt_check(const struct xt_mtchk_param *par)
+static int ebt_among_mt_check(const struct xt_mtchk_param *par)
 {
        const struct ebt_among_info *info = par->matchinfo;
        const struct ebt_entry_match *em =
index e727697c58476ede5ce5ce00d8d3549aa4ef2971..fc62055adb170aa8fe4b0533b43856d382740b3e 100644 (file)
@@ -100,7 +100,7 @@ ebt_arp_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return true;
 }
 
-static bool ebt_arp_mt_check(const struct xt_mtchk_param *par)
+static int ebt_arp_mt_check(const struct xt_mtchk_param *par)
 {
        const struct ebt_arp_info *info = par->matchinfo;
        const struct ebt_entry *e = par->entryinfo;
index 5de6df6f86b8acbdb385b56f2bd62a5f16cf92e8..d1a555dc8878e4c66af8e7339982afd8b869ce1b 100644 (file)
@@ -77,7 +77,7 @@ ebt_ip_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return true;
 }
 
-static bool ebt_ip_mt_check(const struct xt_mtchk_param *par)
+static int ebt_ip_mt_check(const struct xt_mtchk_param *par)
 {
        const struct ebt_ip_info *info = par->matchinfo;
        const struct ebt_entry *e = par->entryinfo;
index 63e3888d20cf676510526908d78491a387b47df1..fa4ecf50fdc97a6b62e5aea512428a4314ede85f 100644 (file)
@@ -80,7 +80,7 @@ ebt_ip6_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return true;
 }
 
-static bool ebt_ip6_mt_check(const struct xt_mtchk_param *par)
+static int ebt_ip6_mt_check(const struct xt_mtchk_param *par)
 {
        const struct ebt_entry *e = par->entryinfo;
        struct ebt_ip6_info *info = par->matchinfo;
index 5b7330b62541b4dd93d2fdf8ef8d63a3f15bd072..abfb0ecd7c17d361c8f303cf45e31bbc2116187c 100644 (file)
@@ -65,7 +65,7 @@ user2credits(u_int32_t user)
        return (user * HZ * CREDITS_PER_JIFFY) / EBT_LIMIT_SCALE;
 }
 
-static bool ebt_limit_mt_check(const struct xt_mtchk_param *par)
+static int ebt_limit_mt_check(const struct xt_mtchk_param *par)
 {
        struct ebt_limit_info *info = par->matchinfo;
 
index 8de8c396d913fc7852d9326edaf8742b4dedf11c..1e5b0b316fbe663e196fcc0172b752de6deaea2b 100644 (file)
@@ -22,7 +22,7 @@ ebt_mark_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return ((skb->mark & info->mask) == info->mark) ^ info->invert;
 }
 
-static bool ebt_mark_mt_check(const struct xt_mtchk_param *par)
+static int ebt_mark_mt_check(const struct xt_mtchk_param *par)
 {
        const struct ebt_mark_m_info *info = par->matchinfo;
 
index e2a07e6cbef381fdc86891debbc960ca8ff8a226..9b3c64516605ab3607dbf811fc0812e9698f791b 100644 (file)
@@ -20,7 +20,7 @@ ebt_pkttype_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return (skb->pkt_type == info->pkt_type) ^ info->invert;
 }
 
-static bool ebt_pkttype_mt_check(const struct xt_mtchk_param *par)
+static int ebt_pkttype_mt_check(const struct xt_mtchk_param *par)
 {
        const struct ebt_pkttype_info *info = par->matchinfo;
 
index 92a93d363765ecca1368326f39cd5a0872ff453b..521186fa6994f6c8ba0a2f47184d0d13d4da51fc 100644 (file)
@@ -153,7 +153,7 @@ ebt_stp_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return true;
 }
 
-static bool ebt_stp_mt_check(const struct xt_mtchk_param *par)
+static int ebt_stp_mt_check(const struct xt_mtchk_param *par)
 {
        const struct ebt_stp_info *info = par->matchinfo;
        const uint8_t bridge_ula[6] = {0x01, 0x80, 0xc2, 0x00, 0x00, 0x00};
index 5c44f51063c3a374c8c6a9f1a95fa786b2e688df..04a9575389d82057cef69230c140e6a32c284d8c 100644 (file)
@@ -79,7 +79,7 @@ ebt_vlan_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return true;
 }
 
-static bool ebt_vlan_mt_check(const struct xt_mtchk_param *par)
+static int ebt_vlan_mt_check(const struct xt_mtchk_param *par)
 {
        struct ebt_vlan_info *info = par->matchinfo;
        const struct ebt_entry *e = par->entryinfo;
index 09f6567a85b7181a20810be850e0bc1ef32d173a..771ffa7b9aff4474eee953a0038b6d1ac69048e7 100644 (file)
@@ -2176,7 +2176,7 @@ icmp_match(const struct sk_buff *skb, const struct xt_match_param *par)
                                    !!(icmpinfo->invflags&IPT_ICMP_INV));
 }
 
-static bool icmp_checkentry(const struct xt_mtchk_param *par)
+static int icmp_checkentry(const struct xt_mtchk_param *par)
 {
        const struct ipt_icmp *icmpinfo = par->matchinfo;
 
index ea4f58a46c6ee6ab8288849d1ea4d7946e9a8052..81197f456d7f2782eec4e1bbadb51c7befa625d8 100644 (file)
@@ -70,7 +70,7 @@ addrtype_mt_v1(const struct sk_buff *skb, const struct xt_match_param *par)
        return ret;
 }
 
-static bool addrtype_mt_checkentry_v1(const struct xt_mtchk_param *par)
+static int addrtype_mt_checkentry_v1(const struct xt_mtchk_param *par)
 {
        struct ipt_addrtype_info_v1 *info = par->matchinfo;
 
index 4f27e170c630176073b6faf4ad53591c9a816170..667ded16e12002c4a171727a4ec356c55ded4c0f 100644 (file)
@@ -55,7 +55,7 @@ static bool ah_mt(const struct sk_buff *skb, const struct xt_match_param *par)
                         !!(ahinfo->invflags & IPT_AH_INV_SPI));
 }
 
-static bool ah_mt_check(const struct xt_mtchk_param *par)
+static int ah_mt_check(const struct xt_mtchk_param *par)
 {
        const struct ipt_ah *ahinfo = par->matchinfo;
 
index e661108c73f18de89abdd07073fe5f18a55eb72c..d1e234fe7f1ad27f4dae665d89e45709647b33d4 100644 (file)
@@ -85,7 +85,7 @@ static bool ecn_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return true;
 }
 
-static bool ecn_mt_check(const struct xt_mtchk_param *par)
+static int ecn_mt_check(const struct xt_mtchk_param *par)
 {
        const struct ipt_ecn_info *info = par->matchinfo;
        const struct ipt_ip *ip = par->entryinfo;
index 41e2429c016331ddc8831667444a49a7df55bad2..595b45d52ff343c425836ada73f097d3275ebd71 100644 (file)
@@ -2209,7 +2209,7 @@ icmp6_match(const struct sk_buff *skb, const struct xt_match_param *par)
 }
 
 /* Called when user tries to insert an entry of this type. */
-static bool icmp6_checkentry(const struct xt_mtchk_param *par)
+static int icmp6_checkentry(const struct xt_mtchk_param *par)
 {
        const struct ip6t_icmp *icmpinfo = par->matchinfo;
 
index 4429bfd39e1173394060d92f1d26c9935cef9ed0..3d570446deefabe125ebd998c9604ae5cd7e26d5 100644 (file)
@@ -87,7 +87,7 @@ static bool ah_mt6(const struct sk_buff *skb, const struct xt_match_param *par)
                !(ahinfo->hdrres && ah->reserved);
 }
 
-static bool ah_mt6_check(const struct xt_mtchk_param *par)
+static int ah_mt6_check(const struct xt_mtchk_param *par)
 {
        const struct ip6t_ah *ahinfo = par->matchinfo;
 
index 5c0da913b4ab1b7424fc1a20afe80a69ca50bf1f..c2dba2701fa3b4630861bf498f1ad79600d4d7d7 100644 (file)
@@ -102,7 +102,7 @@ frag_mt6(const struct sk_buff *skb, const struct xt_match_param *par)
                  (ntohs(fh->frag_off) & IP6_MF));
 }
 
-static bool frag_mt6_check(const struct xt_mtchk_param *par)
+static int frag_mt6_check(const struct xt_mtchk_param *par)
 {
        const struct ip6t_frag *fraginfo = par->matchinfo;
 
index f4b73889d00a02355d492fe5b429ea5023ca5baa..1b294317707bdaf2ed0b3399bbd965dc726ebb27 100644 (file)
@@ -164,7 +164,7 @@ hbh_mt6(const struct sk_buff *skb, const struct xt_match_param *par)
        return false;
 }
 
-static bool hbh_mt6_check(const struct xt_mtchk_param *par)
+static int hbh_mt6_check(const struct xt_mtchk_param *par)
 {
        const struct ip6t_opts *optsinfo = par->matchinfo;
 
index 91490ad9302ccc692c23fd6f37a7f8e9f78bdb7e..90e1e04b79322bff4045e6633c2d67c0ce0f143f 100644 (file)
@@ -118,7 +118,7 @@ ipv6header_mt6(const struct sk_buff *skb, const struct xt_match_param *par)
        }
 }
 
-static bool ipv6header_mt6_check(const struct xt_mtchk_param *par)
+static int ipv6header_mt6_check(const struct xt_mtchk_param *par)
 {
        const struct ip6t_ipv6header_info *info = par->matchinfo;
 
index 0181eb81d24b07101734d10859c45e77de5e7c05..d9408045994ccfb7bb558c9d0b46730056e706ba 100644 (file)
@@ -62,7 +62,7 @@ static bool mh_mt6(const struct sk_buff *skb, const struct xt_match_param *par)
                          !!(mhinfo->invflags & IP6T_MH_INV_TYPE));
 }
 
-static bool mh_mt6_check(const struct xt_mtchk_param *par)
+static int mh_mt6_check(const struct xt_mtchk_param *par)
 {
        const struct ip6t_mh *mhinfo = par->matchinfo;
 
index c58d6533657721d302dd68d255d4e950c1329a32..76397f35eafd1ec13ce5e97a206d6a8cb5022880 100644 (file)
@@ -183,7 +183,7 @@ static bool rt_mt6(const struct sk_buff *skb, const struct xt_match_param *par)
        return false;
 }
 
-static bool rt_mt6_check(const struct xt_mtchk_param *par)
+static int rt_mt6_check(const struct xt_mtchk_param *par)
 {
        const struct ip6t_rt *rtinfo = par->matchinfo;
 
index 4c273e871301975f4435b152dd53dfcd05f47929..1f2c35ef1427bc77e1a4cc4edb36b16f9a5ae1a0 100644 (file)
@@ -132,7 +132,7 @@ xt_cluster_mt(const struct sk_buff *skb, const struct xt_match_param *par)
               !!(info->flags & XT_CLUSTER_F_INV);
 }
 
-static bool xt_cluster_mt_checkentry(const struct xt_mtchk_param *par)
+static int xt_cluster_mt_checkentry(const struct xt_mtchk_param *par)
 {
        struct xt_cluster_match_info *info = par->matchinfo;
 
index edb7bbd9ae54c76071206f6594b6daa3bf1c6b06..136ef4ccdacb77682e6bf2ad9b5a27028f063243 100644 (file)
@@ -93,7 +93,7 @@ connbytes_mt(const struct sk_buff *skb, const struct xt_match_param *par)
                return what >= sinfo->count.from;
 }
 
-static bool connbytes_mt_check(const struct xt_mtchk_param *par)
+static int connbytes_mt_check(const struct xt_mtchk_param *par)
 {
        const struct xt_connbytes_info *sinfo = par->matchinfo;
 
index d5b26dab9e26de074a99cd75c7ab5bd53674244b..a9fec38ab029bb46e11fca49a0a364656b72b26a 100644 (file)
@@ -216,7 +216,7 @@ connlimit_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return false;
 }
 
-static bool connlimit_mt_check(const struct xt_mtchk_param *par)
+static int connlimit_mt_check(const struct xt_mtchk_param *par)
 {
        struct xt_connlimit_info *info = par->matchinfo;
        unsigned int i;
index 7a51ba63f54568e5af17596e2e7b1c1ba3342a2e..df7eaff874f1e75459dd0ee53725640a86e1b6c9 100644 (file)
@@ -103,7 +103,7 @@ connmark_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return ((ct->mark & info->mask) == info->mark) ^ info->invert;
 }
 
-static bool connmark_mt_check(const struct xt_mtchk_param *par)
+static int connmark_mt_check(const struct xt_mtchk_param *par)
 {
        if (nf_ct_l3proto_try_module_get(par->family) < 0) {
                pr_info("cannot load conntrack support for proto=%u\n",
index 387172b6b0d8385d82fc253ee00362e2dc52d474..500e0338a1879452c58c81761ec5a7062ff0ac2f 100644 (file)
@@ -206,7 +206,7 @@ conntrack_mt_v2(const struct sk_buff *skb, const struct xt_match_param *par)
        return conntrack_mt(skb, par, info->state_mask, info->status_mask);
 }
 
-static bool conntrack_mt_check(const struct xt_mtchk_param *par)
+static int conntrack_mt_check(const struct xt_mtchk_param *par)
 {
        if (nf_ct_l3proto_try_module_get(par->family) < 0) {
                pr_info("cannot load conntrack support for proto=%u\n",
index 8f6014f7c8813b97ca638afb4aeb6f779b5a92bd..da8c301d24ea8aca5ce6b7d17162983b79050892 100644 (file)
@@ -123,7 +123,7 @@ dccp_mt(const struct sk_buff *skb, const struct xt_match_param *par)
                           XT_DCCP_OPTION, info->flags, info->invflags);
 }
 
-static bool dccp_mt_check(const struct xt_mtchk_param *par)
+static int dccp_mt_check(const struct xt_mtchk_param *par)
 {
        const struct xt_dccp_info *info = par->matchinfo;
 
index 6ecedc13db0c92ac465c0f1620c27dd02bbb8e2a..295da4ce822c75314105fe01aba66661cd345e3d 100644 (file)
@@ -42,7 +42,7 @@ dscp_mt6(const struct sk_buff *skb, const struct xt_match_param *par)
        return (dscp == info->dscp) ^ !!info->invert;
 }
 
-static bool dscp_mt_check(const struct xt_mtchk_param *par)
+static int dscp_mt_check(const struct xt_mtchk_param *par)
 {
        const struct xt_dscp_info *info = par->matchinfo;
 
index 1a446d626769b3521cdc9618073e095e6c5c3369..9f5da9795674fff72b131e6e5c395cb7b788ffcc 100644 (file)
@@ -60,7 +60,7 @@ static bool esp_mt(const struct sk_buff *skb, const struct xt_match_param *par)
                         !!(espinfo->invflags & XT_ESP_INV_SPI));
 }
 
-static bool esp_mt_check(const struct xt_mtchk_param *par)
+static int esp_mt_check(const struct xt_mtchk_param *par)
 {
        const struct xt_esp *espinfo = par->matchinfo;
 
index 8f3e0c02ca548f70b68050ad9a60753174a55d76..d13800c959302bcdcdf8cfcb3bd87c1d1a46a674 100644 (file)
@@ -671,7 +671,7 @@ hashlimit_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return false;
 }
 
-static bool hashlimit_mt_check_v0(const struct xt_mtchk_param *par)
+static int hashlimit_mt_check_v0(const struct xt_mtchk_param *par)
 {
        struct net *net = par->net;
        struct xt_hashlimit_info *r = par->matchinfo;
@@ -707,7 +707,7 @@ static bool hashlimit_mt_check_v0(const struct xt_mtchk_param *par)
        return true;
 }
 
-static bool hashlimit_mt_check(const struct xt_mtchk_param *par)
+static int hashlimit_mt_check(const struct xt_mtchk_param *par)
 {
        struct net *net = par->net;
        struct xt_hashlimit_mtinfo1 *info = par->matchinfo;
index 482aff2ccf7c0501390f8b1ef51512272110baa3..6e177b279f900000300f01ad0bd8d8578a2b4e7a 100644 (file)
@@ -54,7 +54,7 @@ helper_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return ret;
 }
 
-static bool helper_mt_check(const struct xt_mtchk_param *par)
+static int helper_mt_check(const struct xt_mtchk_param *par)
 {
        struct xt_helper_info *info = par->matchinfo;
 
index b3dfca63fa52928669f94c5ae910b30df5fc8033..138a324df8dfd2286b00587aedef424bdefb074d 100644 (file)
@@ -97,7 +97,7 @@ user2credits(u_int32_t user)
        return (user * HZ * CREDITS_PER_JIFFY) / XT_LIMIT_SCALE;
 }
 
-static bool limit_mt_check(const struct xt_mtchk_param *par)
+static int limit_mt_check(const struct xt_mtchk_param *par)
 {
        struct xt_rateinfo *r = par->matchinfo;
        struct xt_limit_priv *priv;
index 4fa90c86fdb5dbc155f953f8ac3139c31dd2c56b..b446738eab1a26bf9fcb58b23ed9bbd72b3b1a2e 100644 (file)
@@ -152,7 +152,7 @@ check(u_int16_t proto,
                && count <= XT_MULTI_PORTS;
 }
 
-static bool multiport_mt_check_v0(const struct xt_mtchk_param *par)
+static int multiport_mt_check_v0(const struct xt_mtchk_param *par)
 {
        const struct ipt_ip *ip = par->entryinfo;
        const struct xt_multiport *multiinfo = par->matchinfo;
@@ -161,7 +161,7 @@ static bool multiport_mt_check_v0(const struct xt_mtchk_param *par)
                     multiinfo->count);
 }
 
-static bool multiport_mt_check(const struct xt_mtchk_param *par)
+static int multiport_mt_check(const struct xt_mtchk_param *par)
 {
        const struct ipt_ip *ip = par->entryinfo;
        const struct xt_multiport_v1 *multiinfo = par->matchinfo;
@@ -170,7 +170,7 @@ static bool multiport_mt_check(const struct xt_mtchk_param *par)
                     multiinfo->count);
 }
 
-static bool multiport_mt6_check_v0(const struct xt_mtchk_param *par)
+static int multiport_mt6_check_v0(const struct xt_mtchk_param *par)
 {
        const struct ip6t_ip6 *ip = par->entryinfo;
        const struct xt_multiport *multiinfo = par->matchinfo;
@@ -179,7 +179,7 @@ static bool multiport_mt6_check_v0(const struct xt_mtchk_param *par)
                     multiinfo->count);
 }
 
-static bool multiport_mt6_check(const struct xt_mtchk_param *par)
+static int multiport_mt6_check(const struct xt_mtchk_param *par)
 {
        const struct ip6t_ip6 *ip = par->entryinfo;
        const struct xt_multiport_v1 *multiinfo = par->matchinfo;
index 3d42a278408f7bdc80a5a27d48ee3c1ed0e11c89..850e412c83ef6be211af02613d82f3776bc92e9b 100644 (file)
@@ -83,7 +83,7 @@ match_outdev:
        return (!!ret ^ !(info->invert & XT_PHYSDEV_OP_OUT));
 }
 
-static bool physdev_mt_check(const struct xt_mtchk_param *par)
+static int physdev_mt_check(const struct xt_mtchk_param *par)
 {
        const struct xt_physdev_info *info = par->matchinfo;
 
index de3aded6afb842b1f74c4614515e6f87b4edef9c..c9965b640b16ab223e8de27346f3083a8c97d0b0 100644 (file)
@@ -128,7 +128,7 @@ policy_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return ret;
 }
 
-static bool policy_mt_check(const struct xt_mtchk_param *par)
+static int policy_mt_check(const struct xt_mtchk_param *par)
 {
        const struct xt_policy_info *info = par->matchinfo;
 
index 390b7d09fe512f2957769ace3b8a579b64f64086..2861fac5f2e19acbb83c2565c0127dbaa3ab0d70 100644 (file)
@@ -43,7 +43,7 @@ quota_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return ret;
 }
 
-static bool quota_mt_check(const struct xt_mtchk_param *par)
+static int quota_mt_check(const struct xt_mtchk_param *par)
 {
        struct xt_quota_info *q = par->matchinfo;
 
index 4fc6a917f6de5b30d55de8dba82531be03e67826..3b5e3d613b18b89ede0891eb2e73ae84356d8400 100644 (file)
@@ -74,7 +74,7 @@ xt_rateest_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return ret;
 }
 
-static bool xt_rateest_mt_checkentry(const struct xt_mtchk_param *par)
+static int xt_rateest_mt_checkentry(const struct xt_mtchk_param *par)
 {
        struct xt_rateest_match_info *info = par->matchinfo;
        struct xt_rateest *est1, *est2;
index 85309448c5e73ba917ce7fa0d098ded3a432443c..52042c8bf7f2795324bf6fc9ed447bbda767ae1f 100644 (file)
@@ -305,7 +305,7 @@ out:
        return ret;
 }
 
-static bool recent_mt_check(const struct xt_mtchk_param *par)
+static int recent_mt_check(const struct xt_mtchk_param *par)
 {
        struct recent_net *recent_net = recent_pernet(par->net);
        const struct xt_recent_mtinfo *info = par->matchinfo;
index 977b182dea594ab34c983dafa3cc4ba16aa71520..5037a7a0059c6ee273764929b226873aa59d2edd 100644 (file)
@@ -144,7 +144,7 @@ sctp_mt(const struct sk_buff *skb, const struct xt_match_param *par)
                           XT_SCTP_CHUNK_TYPES, info->flags, info->invflags);
 }
 
-static bool sctp_mt_check(const struct xt_mtchk_param *par)
+static int sctp_mt_check(const struct xt_mtchk_param *par)
 {
        const struct xt_sctp_info *info = par->matchinfo;
 
index 94893be802768e49675f68107741cfe6f6c002ad..8b15b1317f1f854a32113c141574a03426cd82bd 100644 (file)
@@ -37,7 +37,7 @@ state_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return (sinfo->statemask & statebit);
 }
 
-static bool state_mt_check(const struct xt_mtchk_param *par)
+static int state_mt_check(const struct xt_mtchk_param *par)
 {
        if (nf_ct_l3proto_try_module_get(par->family) < 0) {
                pr_info("cannot load conntrack support for proto=%u\n",
index 51ac1bbb4f52a2078368832195a1c42097442a7b..a577ab008f575edd5315aeebf6f1224abacb1ac1 100644 (file)
@@ -52,7 +52,7 @@ statistic_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return ret;
 }
 
-static bool statistic_mt_check(const struct xt_mtchk_param *par)
+static int statistic_mt_check(const struct xt_mtchk_param *par)
 {
        struct xt_statistic_info *info = par->matchinfo;
 
index b4d7741113115330bc4ae6d5a6df35d6ae14f4cd..7d1412154e273c878ee64524bc8d0d05d2642662 100644 (file)
@@ -40,7 +40,7 @@ string_mt(const struct sk_buff *skb, const struct xt_match_param *par)
 
 #define STRING_TEXT_PRIV(m) ((struct xt_string_info *)(m))
 
-static bool string_mt_check(const struct xt_mtchk_param *par)
+static int string_mt_check(const struct xt_mtchk_param *par)
 {
        struct xt_string_info *conf = par->matchinfo;
        struct ts_config *ts_conf;
index b53887f83c44386940ac111e307754dfb5244e35..00728410099f832e0d10a274cfbe0980a62733eb 100644 (file)
@@ -120,7 +120,7 @@ static bool tcp_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return true;
 }
 
-static bool tcp_mt_check(const struct xt_mtchk_param *par)
+static int tcp_mt_check(const struct xt_mtchk_param *par)
 {
        const struct xt_tcp *tcpinfo = par->matchinfo;
 
@@ -155,7 +155,7 @@ static bool udp_mt(const struct sk_buff *skb, const struct xt_match_param *par)
                              !!(udpinfo->invflags & XT_UDP_INV_DSTPT));
 }
 
-static bool udp_mt_check(const struct xt_mtchk_param *par)
+static int udp_mt_check(const struct xt_mtchk_param *par)
 {
        const struct xt_udp *udpinfo = par->matchinfo;
 
index 45ed05b5161f930ff547e30ea47f5cc4caf32fd9..db74f4fd57df19d83af2f778b5bc5264cb297d4b 100644 (file)
@@ -217,7 +217,7 @@ time_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return true;
 }
 
-static bool time_mt_check(const struct xt_mtchk_param *par)
+static int time_mt_check(const struct xt_mtchk_param *par)
 {
        const struct xt_time_info *info = par->matchinfo;