aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-03-19 12:16:42 -0400
committerJan Engelhardt <jengelh@medozas.de>2010-03-25 11:04:33 -0400
commit135367b8f6a18507af6b9a6910a14b5699415309 (patch)
tree462e8efb6f4e634421b5c01e96b02280c512eeab /net/netfilter
parentb0f38452ff73da7e9e0ddc68cd5c6b93c897ca0d (diff)
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 <jengelh@medozas.de>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/xt_CONNSECMARK.c2
-rw-r--r--net/netfilter/xt_CT.c2
-rw-r--r--net/netfilter/xt_DSCP.c2
-rw-r--r--net/netfilter/xt_HL.c4
-rw-r--r--net/netfilter/xt_LED.c2
-rw-r--r--net/netfilter/xt_NFLOG.c2
-rw-r--r--net/netfilter/xt_NFQUEUE.c2
-rw-r--r--net/netfilter/xt_RATEEST.c2
-rw-r--r--net/netfilter/xt_SECMARK.c2
-rw-r--r--net/netfilter/xt_TCPMSS.c4
-rw-r--r--net/netfilter/xt_TPROXY.c2
-rw-r--r--net/netfilter/xt_connmark.c2
12 files changed, 14 insertions, 14 deletions
diff --git a/net/netfilter/xt_CONNSECMARK.c b/net/netfilter/xt_CONNSECMARK.c
index 6812865488d6..3f9d0f4f852d 100644
--- a/net/netfilter/xt_CONNSECMARK.c
+++ b/net/netfilter/xt_CONNSECMARK.c
@@ -84,7 +84,7 @@ connsecmark_tg(struct sk_buff *skb, const struct xt_target_param *par)
84 return XT_CONTINUE; 84 return XT_CONTINUE;
85} 85}
86 86
87static bool connsecmark_tg_check(const struct xt_tgchk_param *par) 87static int connsecmark_tg_check(const struct xt_tgchk_param *par)
88{ 88{
89 const struct xt_connsecmark_target_info *info = par->targinfo; 89 const struct xt_connsecmark_target_info *info = par->targinfo;
90 90
diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c
index 6509e03f1e62..c1553bf06cf6 100644
--- a/net/netfilter/xt_CT.c
+++ b/net/netfilter/xt_CT.c
@@ -53,7 +53,7 @@ static u8 xt_ct_find_proto(const struct xt_tgchk_param *par)
53 return 0; 53 return 0;
54} 54}
55 55
56static bool xt_ct_tg_check(const struct xt_tgchk_param *par) 56static int xt_ct_tg_check(const struct xt_tgchk_param *par)
57{ 57{
58 struct xt_ct_target_info *info = par->targinfo; 58 struct xt_ct_target_info *info = par->targinfo;
59 struct nf_conntrack_tuple t; 59 struct nf_conntrack_tuple t;
diff --git a/net/netfilter/xt_DSCP.c b/net/netfilter/xt_DSCP.c
index bbf08a91c600..1fa7b67bf225 100644
--- a/net/netfilter/xt_DSCP.c
+++ b/net/netfilter/xt_DSCP.c
@@ -60,7 +60,7 @@ dscp_tg6(struct sk_buff *skb, const struct xt_target_param *par)
60 return XT_CONTINUE; 60 return XT_CONTINUE;
61} 61}
62 62
63static bool dscp_tg_check(const struct xt_tgchk_param *par) 63static int dscp_tg_check(const struct xt_tgchk_param *par)
64{ 64{
65 const struct xt_DSCP_info *info = par->targinfo; 65 const struct xt_DSCP_info *info = par->targinfo;
66 66
diff --git a/net/netfilter/xt_HL.c b/net/netfilter/xt_HL.c
index 7004ed2ffa44..15ba16108182 100644
--- a/net/netfilter/xt_HL.c
+++ b/net/netfilter/xt_HL.c
@@ -101,7 +101,7 @@ hl_tg6(struct sk_buff *skb, const struct xt_target_param *par)
101 return XT_CONTINUE; 101 return XT_CONTINUE;
102} 102}
103 103
104static bool ttl_tg_check(const struct xt_tgchk_param *par) 104static int ttl_tg_check(const struct xt_tgchk_param *par)
105{ 105{
106 const struct ipt_TTL_info *info = par->targinfo; 106 const struct ipt_TTL_info *info = par->targinfo;
107 107
@@ -114,7 +114,7 @@ static bool ttl_tg_check(const struct xt_tgchk_param *par)
114 return true; 114 return true;
115} 115}
116 116
117static bool hl_tg6_check(const struct xt_tgchk_param *par) 117static int hl_tg6_check(const struct xt_tgchk_param *par)
118{ 118{
119 const struct ip6t_HL_info *info = par->targinfo; 119 const struct ip6t_HL_info *info = par->targinfo;
120 120
diff --git a/net/netfilter/xt_LED.c b/net/netfilter/xt_LED.c
index f511bea9464a..1a3e3dd5a774 100644
--- a/net/netfilter/xt_LED.c
+++ b/net/netfilter/xt_LED.c
@@ -80,7 +80,7 @@ static void led_timeout_callback(unsigned long data)
80 led_trigger_event(&ledinternal->netfilter_led_trigger, LED_OFF); 80 led_trigger_event(&ledinternal->netfilter_led_trigger, LED_OFF);
81} 81}
82 82
83static bool led_tg_check(const struct xt_tgchk_param *par) 83static int led_tg_check(const struct xt_tgchk_param *par)
84{ 84{
85 struct xt_led_info *ledinfo = par->targinfo; 85 struct xt_led_info *ledinfo = par->targinfo;
86 struct xt_led_info_internal *ledinternal; 86 struct xt_led_info_internal *ledinternal;
diff --git a/net/netfilter/xt_NFLOG.c b/net/netfilter/xt_NFLOG.c
index a57c5cf018ec..13e6c0002c8a 100644
--- a/net/netfilter/xt_NFLOG.c
+++ b/net/netfilter/xt_NFLOG.c
@@ -37,7 +37,7 @@ nflog_tg(struct sk_buff *skb, const struct xt_target_param *par)
37 return XT_CONTINUE; 37 return XT_CONTINUE;
38} 38}
39 39
40static bool nflog_tg_check(const struct xt_tgchk_param *par) 40static int nflog_tg_check(const struct xt_tgchk_param *par)
41{ 41{
42 const struct xt_nflog_info *info = par->targinfo; 42 const struct xt_nflog_info *info = par->targinfo;
43 43
diff --git a/net/netfilter/xt_NFQUEUE.c b/net/netfilter/xt_NFQUEUE.c
index 7cc0de63aa0f..d435579a64ca 100644
--- a/net/netfilter/xt_NFQUEUE.c
+++ b/net/netfilter/xt_NFQUEUE.c
@@ -81,7 +81,7 @@ nfqueue_tg_v1(struct sk_buff *skb, const struct xt_target_param *par)
81 return NF_QUEUE_NR(queue); 81 return NF_QUEUE_NR(queue);
82} 82}
83 83
84static bool nfqueue_tg_v1_check(const struct xt_tgchk_param *par) 84static int nfqueue_tg_v1_check(const struct xt_tgchk_param *par)
85{ 85{
86 const struct xt_NFQ_info_v1 *info = par->targinfo; 86 const struct xt_NFQ_info_v1 *info = par->targinfo;
87 u32 maxid; 87 u32 maxid;
diff --git a/net/netfilter/xt_RATEEST.c b/net/netfilter/xt_RATEEST.c
index 87ae97e5516f..9743e50be8ef 100644
--- a/net/netfilter/xt_RATEEST.c
+++ b/net/netfilter/xt_RATEEST.c
@@ -85,7 +85,7 @@ xt_rateest_tg(struct sk_buff *skb, const struct xt_target_param *par)
85 return XT_CONTINUE; 85 return XT_CONTINUE;
86} 86}
87 87
88static bool xt_rateest_tg_checkentry(const struct xt_tgchk_param *par) 88static int xt_rateest_tg_checkentry(const struct xt_tgchk_param *par)
89{ 89{
90 struct xt_rateest_target_info *info = par->targinfo; 90 struct xt_rateest_target_info *info = par->targinfo;
91 struct xt_rateest *est; 91 struct xt_rateest *est;
diff --git a/net/netfilter/xt_SECMARK.c b/net/netfilter/xt_SECMARK.c
index 4855fd9d7c6f..48f8e4f7ea8a 100644
--- a/net/netfilter/xt_SECMARK.c
+++ b/net/netfilter/xt_SECMARK.c
@@ -80,7 +80,7 @@ static bool checkentry_selinux(struct xt_secmark_target_info *info)
80 return true; 80 return true;
81} 81}
82 82
83static bool secmark_tg_check(const struct xt_tgchk_param *par) 83static int secmark_tg_check(const struct xt_tgchk_param *par)
84{ 84{
85 struct xt_secmark_target_info *info = par->targinfo; 85 struct xt_secmark_target_info *info = par->targinfo;
86 86
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c
index 45161d9a9f23..70288dc31583 100644
--- a/net/netfilter/xt_TCPMSS.c
+++ b/net/netfilter/xt_TCPMSS.c
@@ -234,7 +234,7 @@ static inline bool find_syn_match(const struct xt_entry_match *m)
234 return false; 234 return false;
235} 235}
236 236
237static bool tcpmss_tg4_check(const struct xt_tgchk_param *par) 237static int tcpmss_tg4_check(const struct xt_tgchk_param *par)
238{ 238{
239 const struct xt_tcpmss_info *info = par->targinfo; 239 const struct xt_tcpmss_info *info = par->targinfo;
240 const struct ipt_entry *e = par->entryinfo; 240 const struct ipt_entry *e = par->entryinfo;
@@ -256,7 +256,7 @@ static bool tcpmss_tg4_check(const struct xt_tgchk_param *par)
256} 256}
257 257
258#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 258#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
259static bool tcpmss_tg6_check(const struct xt_tgchk_param *par) 259static int tcpmss_tg6_check(const struct xt_tgchk_param *par)
260{ 260{
261 const struct xt_tcpmss_info *info = par->targinfo; 261 const struct xt_tcpmss_info *info = par->targinfo;
262 const struct ip6t_entry *e = par->entryinfo; 262 const struct ip6t_entry *e = par->entryinfo;
diff --git a/net/netfilter/xt_TPROXY.c b/net/netfilter/xt_TPROXY.c
index e9244fdc123a..189df9af4de6 100644
--- a/net/netfilter/xt_TPROXY.c
+++ b/net/netfilter/xt_TPROXY.c
@@ -59,7 +59,7 @@ tproxy_tg(struct sk_buff *skb, const struct xt_target_param *par)
59 return NF_DROP; 59 return NF_DROP;
60} 60}
61 61
62static bool tproxy_tg_check(const struct xt_tgchk_param *par) 62static int tproxy_tg_check(const struct xt_tgchk_param *par)
63{ 63{
64 const struct ipt_ip *i = par->entryinfo; 64 const struct ipt_ip *i = par->entryinfo;
65 65
diff --git a/net/netfilter/xt_connmark.c b/net/netfilter/xt_connmark.c
index df7eaff874f1..0e69427f8cda 100644
--- a/net/netfilter/xt_connmark.c
+++ b/net/netfilter/xt_connmark.c
@@ -74,7 +74,7 @@ connmark_tg(struct sk_buff *skb, const struct xt_target_param *par)
74 return XT_CONTINUE; 74 return XT_CONTINUE;
75} 75}
76 76
77static bool connmark_tg_check(const struct xt_tgchk_param *par) 77static int connmark_tg_check(const struct xt_tgchk_param *par)
78{ 78{
79 if (nf_ct_l3proto_try_module_get(par->family) < 0) { 79 if (nf_ct_l3proto_try_module_get(par->family) < 0) {
80 pr_info("cannot load conntrack support for proto=%u\n", 80 pr_info("cannot load conntrack support for proto=%u\n",