mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -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
|
|
@ -54,7 +54,7 @@ target(struct sk_buff *skb, const struct xt_target_param *par)
|
|||
return mangle->target;
|
||||
}
|
||||
|
||||
static bool checkentry(const struct xt_tgchk_param *par)
|
||||
static int checkentry(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct arpt_mangle *mangle = par->targinfo;
|
||||
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ clusterip_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
|||
return XT_CONTINUE;
|
||||
}
|
||||
|
||||
static bool clusterip_tg_check(const struct xt_tgchk_param *par)
|
||||
static int clusterip_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
struct ipt_clusterip_tgt_info *cipinfo = par->targinfo;
|
||||
const struct ipt_entry *e = par->entryinfo;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ ecn_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
|||
return XT_CONTINUE;
|
||||
}
|
||||
|
||||
static bool ecn_tg_check(const struct xt_tgchk_param *par)
|
||||
static int ecn_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct ipt_ECN_info *einfo = par->targinfo;
|
||||
const struct ipt_entry *e = par->entryinfo;
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@ log_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
|||
return XT_CONTINUE;
|
||||
}
|
||||
|
||||
static bool log_tg_check(const struct xt_tgchk_param *par)
|
||||
static int log_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct ipt_log_info *loginfo = par->targinfo;
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ MODULE_AUTHOR("Netfilter Core Team <[email protected]>");
|
|||
MODULE_DESCRIPTION("Xtables: automatic-address SNAT");
|
||||
|
||||
/* FIXME: Multiple targets. --RR */
|
||||
static bool masquerade_tg_check(const struct xt_tgchk_param *par)
|
||||
static int masquerade_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct nf_nat_multi_range_compat *mr = par->targinfo;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ MODULE_LICENSE("GPL");
|
|||
MODULE_AUTHOR("Svenning Soerensen <[email protected]>");
|
||||
MODULE_DESCRIPTION("Xtables: 1:1 NAT mapping of IPv4 subnets");
|
||||
|
||||
static bool netmap_tg_check(const struct xt_tgchk_param *par)
|
||||
static int netmap_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct nf_nat_multi_range_compat *mr = par->targinfo;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ MODULE_AUTHOR("Netfilter Core Team <[email protected]>");
|
|||
MODULE_DESCRIPTION("Xtables: Connection redirection to localhost");
|
||||
|
||||
/* FIXME: Take multiple ranges --RR */
|
||||
static bool redirect_tg_check(const struct xt_tgchk_param *par)
|
||||
static int redirect_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct nf_nat_multi_range_compat *mr = par->targinfo;
|
||||
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ reject_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
|||
return NF_DROP;
|
||||
}
|
||||
|
||||
static bool reject_tg_check(const struct xt_tgchk_param *par)
|
||||
static int reject_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct ipt_reject_info *rejinfo = par->targinfo;
|
||||
const struct ipt_entry *e = par->entryinfo;
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ static void ipt_logfn(u_int8_t pf,
|
|||
ipt_ulog_packet(hooknum, skb, in, out, &loginfo, prefix);
|
||||
}
|
||||
|
||||
static bool ulog_tg_check(const struct xt_tgchk_param *par)
|
||||
static int ulog_tg_check(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct ipt_ulog_info *loginfo = par->targinfo;
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ ipt_dnat_target(struct sk_buff *skb, const struct xt_target_param *par)
|
|||
return nf_nat_setup_info(ct, &mr->range[0], IP_NAT_MANIP_DST);
|
||||
}
|
||||
|
||||
static bool ipt_snat_checkentry(const struct xt_tgchk_param *par)
|
||||
static int ipt_snat_checkentry(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct nf_nat_multi_range_compat *mr = par->targinfo;
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ static bool ipt_snat_checkentry(const struct xt_tgchk_param *par)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool ipt_dnat_checkentry(const struct xt_tgchk_param *par)
|
||||
static int ipt_dnat_checkentry(const struct xt_tgchk_param *par)
|
||||
{
|
||||
const struct nf_nat_multi_range_compat *mr = par->targinfo;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue