mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
netfilter: xtables: change xt_target.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.
// <smpl>
@@
type bool;
identifier check, par;
@@
-bool check
+int check
(struct xt_tgchk_param *par) { ... }
// </smpl>
Minus the change it does to xt_ct_find_proto.
Signed-off-by: Jan Engelhardt <[email protected]>
This commit is contained in:
parent
b0f38452ff
commit
135367b8f6
33 changed files with 37 additions and 37 deletions
|
|
@ -57,7 +57,7 @@ ebt_arpreply_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
|||
return info->target;
|
||||
}
|
||||
|
||||
static bool ebt_arpreply_tg_check(const struct xt_tgchk_param *par)
|
||||
static int ebt_arpreply_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct ebt_arpreply_info *info = par->targinfo;
|
||||
const struct ebt_entry *e = par->entryinfo;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ ebt_dnat_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
|||
return info->target;
|
||||
}
|
||||
|
||||
static bool ebt_dnat_tg_check(const struct xt_tgchk_param *par)
|
||||
static int ebt_dnat_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct ebt_nat_info *info = par->targinfo;
|
||||
unsigned int hook_mask;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
static DEFINE_SPINLOCK(ebt_log_lock);
|
||||
|
||||
static bool ebt_log_tg_check(const struct xt_tgchk_param *par)
|
||||
static int ebt_log_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
struct ebt_log_info *info = par->targinfo;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ ebt_mark_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
|||
return info->target | ~EBT_VERDICT_BITS;
|
||||
}
|
||||
|
||||
static bool ebt_mark_tg_check(const struct xt_tgchk_param *par)
|
||||
static int ebt_mark_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct ebt_mark_t_info *info = par->targinfo;
|
||||
int tmp;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ ebt_nflog_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
|||
return EBT_CONTINUE;
|
||||
}
|
||||
|
||||
static bool ebt_nflog_tg_check(const struct xt_tgchk_param *par)
|
||||
static int ebt_nflog_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
struct ebt_nflog_info *info = par->targinfo;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ ebt_redirect_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
|||
return info->target;
|
||||
}
|
||||
|
||||
static bool ebt_redirect_tg_check(const struct xt_tgchk_param *par)
|
||||
static int ebt_redirect_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct ebt_redirect_info *info = par->targinfo;
|
||||
unsigned int hook_mask;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ out:
|
|||
return info->target | ~EBT_VERDICT_BITS;
|
||||
}
|
||||
|
||||
static bool ebt_snat_tg_check(const struct xt_tgchk_param *par)
|
||||
static int ebt_snat_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct ebt_nat_info *info = par->targinfo;
|
||||
int tmp;
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ ebt_ulog_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
|||
return EBT_CONTINUE;
|
||||
}
|
||||
|
||||
static bool ebt_ulog_tg_check(const struct xt_tgchk_param *par)
|
||||
static int ebt_ulog_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
struct ebt_ulog_info *uloginfo = par->targinfo;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue