host: print %#H format specifiers not as %any, but with the port
authorMartin Willi <martin@revosec.ch>
Thu, 11 Apr 2013 17:51:45 +0000 (19:51 +0200)
committerMartin Willi <martin@revosec.ch>
Mon, 6 May 2013 14:10:11 +0000 (16:10 +0200)
src/libstrongswan/networking/host.c

index 268d9b1..65e1b77 100644 (file)
@@ -111,7 +111,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) && !spec->plus)
+       else if (is_anyaddr(this) && !spec->plus && !spec->hash)
        {
                snprintf(buffer, sizeof(buffer), "%%any%s",
                                 this->address.sa_family == AF_INET6 ? "6" : "");