@@ -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:
@@ -376,10 +376,6 @@ brip6_parse(int c, char **argv, int invert, unsigned int *flags,
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:
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> --- extensions/libebt_ip.c | 4 ---- extensions/libebt_ip6.c | 4 ---- 2 files changed, 8 deletions(-)