summaryrefslogtreecommitdiffstats
path: root/iptables-restore.c
diff options
context:
space:
mode:
authorMartin Josefsson <gandalf@wlug.westbo.se>2004-02-01 21:46:04 +0000
committerMartin Josefsson <gandalf@wlug.westbo.se>2004-02-01 21:46:04 +0000
commit3229a7cbdbf36fd499efacc8834ea525e0902eb7 (patch)
tree40fbcdf479bc59a79e000f48318cc3e6a6291ab6 /iptables-restore.c
parent3673dcb1545a53d70cee3ad14d101fab33541990 (diff)
Complain when COMMIT is missing for the last table in the input
Diffstat (limited to 'iptables-restore.c')
-rw-r--r--iptables-restore.c7
1 files changed, 6 insertions, 1 deletions
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 <getopt.h>
@@ -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;
}