aboutsummaryrefslogtreecommitdiffstats
path: root/src/pluto/kernel.c
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2010-05-14 17:07:03 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2010-05-14 17:07:03 +0200
commit03b5e4d8d79bceb12cdc4b227d10c46bb6721b98 (patch)
tree9146df2accfbc063e418a2752b90a19e24462c99 /src/pluto/kernel.c
parenta27354685451ac84a7decc411f17cfbbbb15d59f (diff)
downloadstrongswan-03b5e4d8d79bceb12cdc4b227d10c46bb6721b98.tar.bz2
strongswan-03b5e4d8d79bceb12cdc4b227d10c46bb6721b98.tar.xz
refactoring of Mode Config functionality allows transport and handling of any attribute
Diffstat (limited to 'src/pluto/kernel.c')
-rw-r--r--src/pluto/kernel.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/pluto/kernel.c b/src/pluto/kernel.c
index ee22fb55e..79ba3aa57 100644
--- a/src/pluto/kernel.c
+++ b/src/pluto/kernel.c
@@ -483,16 +483,14 @@ static bool do_command(connection_t *c, struct spd_route *sr,
strncat(nexthop_str, "' ", sizeof(nexthop_str));
}
- if (addrbytesptr(&sr->this.host_srcip, NULL)
- && !isanyaddr(&sr->this.host_srcip))
+ if (!sr->this.host_srcip->is_anyaddr(sr->this.host_srcip))
{
char *n;
strcpy(srcip_str, "PLUTO_MY_SOURCEIP='");
n = srcip_str + strlen(srcip_str);
-
- addrtot(&sr->this.host_srcip, 0
- ,n , sizeof(srcip_str)-strlen(srcip_str));
+ snprintf(n, sizeof(srcip_str)-strlen(srcip_str), "%H",
+ sr->this.host_srcip);
strncat(srcip_str, "' ", sizeof(srcip_str));
}