From: Martin Josefsson Date: Sun, 1 Feb 2004 21:46:04 +0000 (+0000) Subject: Complain when COMMIT is missing for the last table in the input X-Git-Tag: v1.3.0-rc1~138 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3229a7cbdbf36fd499efacc8834ea525e0902eb7;p=thirdparty%2Fiptables.git Complain when COMMIT is missing for the last table in the input --- diff --git a/iptables-restore.c b/iptables-restore.c index 6ccf0b54..27422e32 100644 --- a/iptables-restore.c +++ b/iptables-restore.c @@ -4,7 +4,7 @@ * * This code is distributed under the terms of GNU GPL v2 * - * $Id: iptables-restore.c,v 1.30 2004/01/31 19:33:47 gandalf Exp $ + * $Id: iptables-restore.c,v 1.31 2004/01/31 19:41:49 gandalf Exp $ */ #include @@ -386,6 +386,11 @@ int main(int argc, char *argv[]) exit(1); } } + if (in_table) { + fprintf(stderr, "%s: COMMIT expected at line %u\n", + program_name, line + 1); + exit(1); + } return 0; }