diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2010-03-25 11:34:45 -0400 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2010-03-25 11:55:49 -0400 |
commit | d6b00a5345ce4e86e8b00a88bb84a2c0c1f69ddc (patch) | |
tree | 11d68bb08584fbbae02a7bf22599bdd67da4408e /net/netfilter/xt_TPROXY.c | |
parent | bd414ee605ff3ac5fcd79f57269a897879ee4cde (diff) |
netfilter: xtables: change targets to return error code
Part of the transition of done by this semantic patch:
// <smpl>
@ rule1 @
struct xt_target ops;
identifier check;
@@
ops.checkentry = check;
@@
identifier rule1.check;
@@
check(...) { <...
-return true;
+return 0;
...> }
@@
identifier rule1.check;
@@
check(...) { <...
-return false;
+return -EINVAL;
...> }
// </smpl>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/netfilter/xt_TPROXY.c')
-rw-r--r-- | net/netfilter/xt_TPROXY.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/xt_TPROXY.c b/net/netfilter/xt_TPROXY.c index 189df9af4de..4f246ddc5c4 100644 --- a/net/netfilter/xt_TPROXY.c +++ b/net/netfilter/xt_TPROXY.c | |||
@@ -65,11 +65,11 @@ static int tproxy_tg_check(const struct xt_tgchk_param *par) | |||
65 | 65 | ||
66 | if ((i->proto == IPPROTO_TCP || i->proto == IPPROTO_UDP) | 66 | if ((i->proto == IPPROTO_TCP || i->proto == IPPROTO_UDP) |
67 | && !(i->invflags & IPT_INV_PROTO)) | 67 | && !(i->invflags & IPT_INV_PROTO)) |
68 | return true; | 68 | return 0; |
69 | 69 | ||
70 | pr_info("Can be used only in combination with " | 70 | pr_info("Can be used only in combination with " |
71 | "either -p tcp or -p udp\n"); | 71 | "either -p tcp or -p udp\n"); |
72 | return false; | 72 | return -EINVAL; |
73 | } | 73 | } |
74 | 74 | ||
75 | static struct xt_target tproxy_tg_reg __read_mostly = { | 75 | static struct xt_target tproxy_tg_reg __read_mostly = { |