]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: add missing checks for specific flags (2)
authorJan Engelhardt <jengelh@medozas.de>
Tue, 1 Mar 2011 18:48:10 +0000 (19:48 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Wed, 6 Apr 2011 10:54:22 +0000 (12:54 +0200)
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 <jengelh@medozas.de>
extensions/libip6t_ipv6header.c

index 187e0a43021d14e51b24bc590a586405058101a3..c05cedbb8b515c813b982d5c4981eae600a89f4b 100644 (file)
@@ -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