From: Harald Welte Date: Sat, 26 May 2001 04:41:56 +0000 (+0000) Subject: iptables-save had problems with multiple spaces between options (A. van Schie) X-Git-Tag: v1.2.3~50 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=974d0101a7208897e2b8f1b69fd20aecd90bb150;p=thirdparty%2Fiptables.git iptables-save had problems with multiple spaces between options (A. van Schie) --- diff --git a/iptables-restore.c b/iptables-restore.c index 438903ec..e5a28f3f 100644 --- a/iptables-restore.c +++ b/iptables-restore.c @@ -4,7 +4,7 @@ * * This coude is distributed under the terms of GNU GPL * - * $Id: iptables-restore.c,v 1.10 2001/03/15 15:12:02 laforge Exp $ + * $Id: iptables-restore.c,v 1.11 2001/05/03 20:50:03 laforge Exp $ */ #include @@ -308,8 +308,11 @@ int main(int argc, char *argv[]) if (quote_open) continue; - if (!param_len) - break; + if (!param_len) { + /* two spaces? */ + param_start++; + continue; + } /* end of one parameter */ strncpy(param_buffer, param_start,