From: Jan Engelhardt Date: Tue, 1 Mar 2011 18:48:10 +0000 (+0100) Subject: extensions: add missing checks for specific flags (2) X-Git-Tag: v1.4.11~27^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=458d84de2412b43604a8efe2b82a2084a2859a46;p=thirdparty%2Fiptables.git extensions: add missing checks for specific flags (2) Addendum to v1.4.10-75-g4e5d4bf. It does not make sense to use ipv6header's --soft without specifying any options. Signed-off-by: Jan Engelhardt --- diff --git a/extensions/libip6t_ipv6header.c b/extensions/libip6t_ipv6header.c index 187e0a43..c05cedbb 100644 --- a/extensions/libip6t_ipv6header.c +++ b/extensions/libip6t_ipv6header.c @@ -202,7 +202,9 @@ ipv6header_parse(int c, char **argv, int invert, unsigned int *flags, static void ipv6header_check(unsigned int flags) { - if (!flags) xtables_error(PARAMETER_PROBLEM, "ip6t_ipv6header: no options specified"); + if (!(flags & IPV6_HDR_HEADER)) + xtables_error(PARAMETER_PROBLEM, + "ip6t_ipv6header: no options specified"); } static void