The old code sets environment variable PLUTO_MY_SOURCEIP for each
virtual IP, which has the effect to assign the last virtual IP.
---
 src/libcharon/plugins/updown/updown_listener.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/libcharon/plugins/updown/updown_listener.c 
b/src/libcharon/plugins/updown/updown_listener.c
index 2c3f932..52891fc 100644
--- a/src/libcharon/plugins/updown/updown_listener.c
+++ b/src/libcharon/plugins/updown/updown_listener.c
@@ -154,6 +154,7 @@ static char *make_vip_vars(private_updown_listener_t *this, 
ike_sa_t *ike_sa)
                        snprintf(current, sizeof(current),
                                                 "PLUTO_MY_SOURCEIP='%H' ", 
host);
                        strncat(total, current, sizeof(total) - strlen(total) - 
1);
+                       first = FALSE;
                }
                switch (host->get_family(host))
                {
-- 
1.8.4.5


_______________________________________________
Dev mailing list
[email protected]
https://lists.strongswan.org/mailman/listinfo/dev

Reply via email to