]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
nft: skip unset tables on table configuration emulation
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Fri, 13 Sep 2013 16:25:57 +0000 (18:25 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 30 Dec 2013 22:50:45 +0000 (23:50 +0100)
The ARP family has less tables, so skip iteration once we find
a null one.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/nft.c

index 143293b5886d7d26c547c9e29dd5cb6ec3b6148b..49d345d2eda83e6b7d7316240972043d8576dcd7 100644 (file)
@@ -295,6 +295,9 @@ static struct builtin_table
        bool found = false;
 
        for (i=0; i<TABLES_MAX; i++) {
+               if (h->tables[i].name == NULL)
+                       break;
+
                if (strcmp(h->tables[i].name, table) != 0)
                        continue;