nft: skip unset tables on table configuration emulation
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>
diff --git a/iptables/nft.c b/iptables/nft.c
index 143293b..49d345d 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -295,6 +295,9 @@
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;