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>
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:
if (invert)
info->invflags |= EBT_IP6_PROTO;
info->protocol = xtables_parse_protocol(optarg);
- if (info->protocol == -1)
- xtables_error(PARAMETER_PROBLEM,
- "Unknown specified IP protocol - %s",
- optarg);
info->bitmask |= EBT_IP6_PROTO;
break;
default: