mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
netfilter: xtables: change xt_match.checkentry return type
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 <[email protected]>
This commit is contained in:
parent
9f56731741
commit
b0f38452ff
45 changed files with 50 additions and 50 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue