summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgandalf <gandalf>2004-02-01 21:46:04 +0000
committergandalf <gandalf>2004-02-01 21:46:04 +0000
commitc97b32d0c32fbf9e06cfa9559919a32aa33b490d (patch)
tree40fbcdf479bc59a79e000f48318cc3e6a6291ab6
parent15284ba5267ea28793728ec143276de892ab38d2 (diff)
Complain when COMMIT is missing for the last table in the input
-rw-r--r--iptables-restore.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/iptables-restore.c b/iptables-restore.c
index 6ccf0b5..27422e3 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;
}