From bf97128c7262f17a02fec41cdae75b472ba77f88 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 3 Nov 2009 19:55:11 +0100 Subject: libxtables: hand argv to xtables_check_inverse In going to fix NF bug #611, "argv" is needed in xtables_check_inverse to set "optarg" to the right spot in case of an intrapositional negation. References: http://bugzilla.netfilter.org/show_bug.cgi?id=611 Signed-off-by: Jan Engelhardt --- extensions/libipt_addrtype.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'extensions/libipt_addrtype.c') diff --git a/extensions/libipt_addrtype.c b/extensions/libipt_addrtype.c index cda70518..c3052812 100644 --- a/extensions/libipt_addrtype.c +++ b/extensions/libipt_addrtype.c @@ -106,7 +106,7 @@ addrtype_parse_v0(int c, char **argv, int invert, unsigned int *flags, if (*flags&IPT_ADDRTYPE_OPT_SRCTYPE) xtables_error(PARAMETER_PROBLEM, "addrtype: can't specify src-type twice"); - xtables_check_inverse(optarg, &invert, &optind, 0); + xtables_check_inverse(optarg, &invert, &optind, 0, argv); parse_types(argv[optind-1], &info->source); if (invert) info->invert_source = 1; @@ -116,7 +116,7 @@ addrtype_parse_v0(int c, char **argv, int invert, unsigned int *flags, if (*flags&IPT_ADDRTYPE_OPT_DSTTYPE) xtables_error(PARAMETER_PROBLEM, "addrtype: can't specify dst-type twice"); - xtables_check_inverse(optarg, &invert, &optind, 0); + xtables_check_inverse(optarg, &invert, &optind, 0, argv); parse_types(argv[optind-1], &info->dest); if (invert) info->invert_dest = 1; @@ -141,7 +141,7 @@ addrtype_parse_v1(int c, char **argv, int invert, unsigned int *flags, if (*flags & IPT_ADDRTYPE_OPT_SRCTYPE) xtables_error(PARAMETER_PROBLEM, "addrtype: can't specify src-type twice"); - xtables_check_inverse(optarg, &invert, &optind, 0); + xtables_check_inverse(optarg, &invert, &optind, 0, argv); parse_types(argv[optind-1], &info->source); if (invert) info->flags |= IPT_ADDRTYPE_INVERT_SOURCE; @@ -151,7 +151,7 @@ addrtype_parse_v1(int c, char **argv, int invert, unsigned int *flags, if (*flags & IPT_ADDRTYPE_OPT_DSTTYPE) xtables_error(PARAMETER_PROBLEM, "addrtype: can't specify dst-type twice"); - xtables_check_inverse(optarg, &invert, &optind, 0); + xtables_check_inverse(optarg, &invert, &optind, 0, argv); parse_types(argv[optind-1], &info->dest); if (invert) info->flags |= IPT_ADDRTYPE_INVERT_DEST; -- cgit v1.2.3