aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils/host.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2012-08-08 14:06:59 +0200
committerTobias Brunner <tobias@strongswan.org>2012-08-13 11:00:29 +0200
commitf12b3ad2c90d8a3f68cf32eafeea8c61c26e7d2d (patch)
tree6252cea5072810881e40ff60646cf34b2e181360 /src/libstrongswan/utils/host.c
parent495e12aeadb02bfda8621984ff0a4e07e1fcd89f (diff)
downloadstrongswan-f12b3ad2c90d8a3f68cf32eafeea8c61c26e7d2d.tar.bz2
strongswan-f12b3ad2c90d8a3f68cf32eafeea8c61c26e7d2d.tar.xz
Don't print hosts as %any if %+H is used
That is, the plus sign can be used in the format string to force a numeric string representation of all host_t objects even 0.0.0.0 and :: which would otherwise be printed as %any and %any6.
Diffstat (limited to 'src/libstrongswan/utils/host.c')
-rw-r--r--src/libstrongswan/utils/host.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstrongswan/utils/host.c b/src/libstrongswan/utils/host.c
index 0f40a0dd4..3a16138a4 100644
--- a/src/libstrongswan/utils/host.c
+++ b/src/libstrongswan/utils/host.c
@@ -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" : "");