]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Complain when COMMIT is missing for the last table in the input
authorMartin Josefsson <gandalf@wlug.westbo.se>
Sun, 1 Feb 2004 21:46:04 +0000 (21:46 +0000)
committerMartin Josefsson <gandalf@wlug.westbo.se>
Sun, 1 Feb 2004 21:46:04 +0000 (21:46 +0000)
iptables-restore.c

index 6ccf0b546356cb0495bcc26037638b8335ad5377..27422e323fa93da638f8f26758bc0f4a86184c86 100644 (file)
@@ -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;
 }