From ce67ab162d4bb973c5974f6bab302d6af9777b15 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Thu, 19 Mar 2009 09:04:20 +0000 Subject: [PATCH] print IPv6 %any hosts as %any6 --- src/libstrongswan/utils/host.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libstrongswan/utils/host.c b/src/libstrongswan/utils/host.c index e11017c1e..6a6a49089 100644 --- a/src/libstrongswan/utils/host.c +++ b/src/libstrongswan/utils/host.c @@ -119,7 +119,8 @@ int host_printf_hook(char *dst, size_t dstlen, printf_hook_spec_t *spec, } else if (is_anyaddr(this)) { - snprintf(buffer, sizeof(buffer), "%%any"); + snprintf(buffer, sizeof(buffer), "%%any%s", + this->address.sa_family == AF_INET6 ? "6" : ""); } else {