summaryrefslogtreecommitdiffstats
path: root/extensions/libebt_ip.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-09-19 15:17:03 +0200
committerFlorian Westphal <fw@strlen.de>2018-09-24 11:49:55 +0200
commitf40ce2d853591220f16c0851bf8665e6967af1f1 (patch)
treee976d5a67c27b6f1aebc2c4769f0d2a3b6af8bce /extensions/libebt_ip.c
parent47fb86cef5f4da6ee86100e410212b7b54e4800c (diff)
extensions: libebt_ip{, 6}: Drop pointless error checking
Since info->protocol is of type __u8, its value will never become -1. Apart from that, xtables_parse_protocol() calls xt_params->exit_err() in case of error, so this code is dead anyway. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'extensions/libebt_ip.c')
-rw-r--r--extensions/libebt_ip.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/extensions/libebt_ip.c b/extensions/libebt_ip.c
index 4b5c1665..2b28c615 100644
--- a/extensions/libebt_ip.c
+++ b/extensions/libebt_ip.c
@@ -437,10 +437,6 @@ brip_parse(int c, char **argv, int invert, unsigned int *flags,
if (invert)
info->invflags |= EBT_IP_PROTO;
info->protocol = xtables_parse_protocol(optarg);
- if (info->protocol == -1)
- xtables_error(PARAMETER_PROBLEM,
- "Unknown specified IP protocol - %s",
- optarg);
info->bitmask |= EBT_IP_PROTO;
break;
default: