diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-05-14 17:07:03 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-05-14 17:07:03 +0200 |
commit | 03b5e4d8d79bceb12cdc4b227d10c46bb6721b98 (patch) | |
tree | 9146df2accfbc063e418a2752b90a19e24462c99 /src/pluto/kernel.c | |
parent | a27354685451ac84a7decc411f17cfbbbb15d59f (diff) | |
download | strongswan-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.c | 8 |
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)); } |