diff options
author | Martin Willi <martin@revosec.ch> | 2010-03-30 10:24:47 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2010-03-30 10:24:47 +0200 |
commit | 360ef1606f989a12663d587b6ff5ee69d13c0795 (patch) | |
tree | d5980745cc4567b75600ea71d593155f6f3aee71 /src | |
parent | 061c95b449f5c6ce9ca81eb1f6e8a846a69c447c (diff) | |
download | strongswan-360ef1606f989a12663d587b6ff5ee69d13c0795.tar.bz2 strongswan-360ef1606f989a12663d587b6ff5ee69d13c0795.tar.xz |
Fixed handling of IKE_SAs without a virtual IP in farp plugin
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/plugins/farp/farp_listener.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/libcharon/plugins/farp/farp_listener.c b/src/libcharon/plugins/farp/farp_listener.c index 3875c1faf..8eed49778 100644 --- a/src/libcharon/plugins/farp/farp_listener.c +++ b/src/libcharon/plugins/farp/farp_listener.c @@ -87,11 +87,14 @@ METHOD(listener_t, message_hook, bool, host_t *ip; ip = ike_sa->get_virtual_ip(ike_sa, FALSE); - ip = ip->clone(ip); - this->lock->write_lock(this->lock); - ip = this->ips->put(this->ips, ip, ip); - this->lock->unlock(this->lock); - DESTROY_IF(ip); + if (ip) + { + ip = ip->clone(ip); + this->lock->write_lock(this->lock); + ip = this->ips->put(this->ips, ip, ip); + this->lock->unlock(this->lock); + DESTROY_IF(ip); + } } return TRUE; } |