From b77f1dafb9f35752bb9685323bcacb32a0e6ddc5 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 14 Mar 2002 11:35:58 +0000 Subject: Fix 'iptables -p !' bug (segfault when `!' used without argument) --- extensions/libipt_ttl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'extensions/libipt_ttl.c') diff --git a/extensions/libipt_ttl.c b/extensions/libipt_ttl.c index 61635f78..4ef97643 100644 --- a/extensions/libipt_ttl.c +++ b/extensions/libipt_ttl.c @@ -1,7 +1,7 @@ /* Shared library add-on to iptables to add TTL matching support * (C) 2000 by Harald Welte * - * $Id: libipt_ttl.c,v 1.4 2000/11/13 11:16:08 laforge Exp $ + * $Id: libipt_ttl.c,v 1.4 2002/02/25 11:25:41 laforge Exp $ * * This program is released under the terms of GNU GPL */ @@ -37,8 +37,7 @@ static int parse(int c, char **argv, int invert, unsigned int *flags, struct ipt_ttl_info *info = (struct ipt_ttl_info *) (*match)->data; u_int8_t value; - if (check_inverse(optarg, &invert)) - optind++; + check_inverse(optarg, &invert, &optind, 0); value = atoi(argv[optind-1]); if (*flags) -- cgit v1.2.3