From 3229a7cbdbf36fd499efacc8834ea525e0902eb7 Mon Sep 17 00:00:00 2001 From: Martin Josefsson Date: Sun, 1 Feb 2004 21:46:04 +0000 Subject: Complain when COMMIT is missing for the last table in the input --- iptables-restore.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'iptables-restore.c') 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; } -- cgit v1.2.3