summaryrefslogtreecommitdiff
path: root/net/netfilter/xt_HL.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-02-09 15:51:59 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-02-14 21:05:33 +0100
commit0cc9501f94592125b2012452c57054b8215bcf33 (patch)
treea7e5cbae8675ddad10c41535f61315647b15fcb2 /net/netfilter/xt_HL.c
parentdb93a3632b0f8773a3899e04a3a3e0aa7a26eb46 (diff)
netfilter: x_tables: remove pr_info where possible
remove several pr_info messages that cannot be triggered with iptables, the check is only to ensure input is sane. iptables(8) already prints error messages in these cases. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/xt_HL.c')
-rw-r--r--net/netfilter/xt_HL.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/net/netfilter/xt_HL.c b/net/netfilter/xt_HL.c
index 1535e87ed9bd..4653b071bed4 100644
--- a/net/netfilter/xt_HL.c
+++ b/net/netfilter/xt_HL.c
@@ -105,10 +105,8 @@ static int ttl_tg_check(const struct xt_tgchk_param *par)
{
const struct ipt_TTL_info *info = par->targinfo;
- if (info->mode > IPT_TTL_MAXMODE) {
- pr_info("TTL: invalid or unknown mode %u\n", info->mode);
+ if (info->mode > IPT_TTL_MAXMODE)
return -EINVAL;
- }
if (info->mode != IPT_TTL_SET && info->ttl == 0)
return -EINVAL;
return 0;
@@ -118,15 +116,10 @@ static int hl_tg6_check(const struct xt_tgchk_param *par)
{
const struct ip6t_HL_info *info = par->targinfo;
- if (info->mode > IP6T_HL_MAXMODE) {
- pr_info("invalid or unknown mode %u\n", info->mode);
+ if (info->mode > IP6T_HL_MAXMODE)
return -EINVAL;
- }
- if (info->mode != IP6T_HL_SET && info->hop_limit == 0) {
- pr_info("increment/decrement does not "
- "make sense with value 0\n");
+ if (info->mode != IP6T_HL_SET && info->hop_limit == 0)
return -EINVAL;
- }
return 0;
}