Don't print hosts as %any if %+H is used
[strongswan.git] / src / libstrongswan / utils / host.c
index 0f40a0d..3a16138 100644 (file)
@@ -110,7 +110,7 @@ int host_printf_hook(printf_hook_data_t *data, printf_hook_spec_t *spec,
        {
                snprintf(buffer, sizeof(buffer), "(null)");
        }
-       else if (is_anyaddr(this))
+       else if (is_anyaddr(this) && !spec->plus)
        {
                snprintf(buffer, sizeof(buffer), "%%any%s",
                                 this->address.sa_family == AF_INET6 ? "6" : "");