]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
ip6tables: Use consistent exit code for EAGAIN
authorKevin Cernekee <cernekee@gmail.com>
Sat, 2 Nov 2013 04:08:34 +0000 (21:08 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 3 Nov 2013 21:42:43 +0000 (22:42 +0100)
As of commit 056564f6a (Add new exit value to indicate concurrency
issues), the IPv4 iptables binary returns exit status 4 to indicate that
the kernel returned EAGAIN when trying to update a table.  But ip6tables
still returns exit status 1 under the same circumstances.  Update
ip6tables to bring it in line with iptables behavior.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/ip6tables-standalone.c

index 656e08d551aa2460365f8ec16412efe5b3945e5e..35d2d9a51f57529f4ef56d54bf6e183191ff4493 100644 (file)
@@ -73,6 +73,8 @@ ip6tables_main(int argc, char *argv[])
                        fprintf(stderr, "ip6tables: %s.\n",
                                ip6tc_strerror(errno));
                }
+               if (errno == EAGAIN)
+                       exit(RESOURCE_PROBLEM);
        }
 
        exit(!ret);