Call ipaddr_to_network before ipaddr_to_host. This saves waiting for a reverse DNS lookup query when the entry is present in /etc/networks. This also follows the same order as in rules creation. Signed-off-by: Hani Benhabiles <kroosec@xxxxxxxxx> --- libxtables/xtables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libxtables/xtables.c b/libxtables/xtables.c index fb60c01..bb25262 100644 --- a/libxtables/xtables.c +++ b/libxtables/xtables.c @@ -1207,8 +1207,8 @@ const char *xtables_ipaddr_to_anyname(const struct in_addr *addr) { const char *name; - if ((name = ipaddr_to_host(addr)) != NULL || - (name = ipaddr_to_network(addr)) != NULL) + if ((name = ipaddr_to_network(addr)) != NULL || + (name = ipaddr_to_host(addr)) != NULL) return name; return xtables_ipaddr_to_numeric(addr); -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html