Fixed handling of IKE_SAs without a virtual IP in farp plugin

This commit is contained in:
Martin Willi
2010-03-30 10:24:47 +02:00
parent 061c95b449
commit 360ef1606f
@@ -87,12 +87,15 @@ METHOD(listener_t, message_hook, bool,
host_t *ip; host_t *ip;
ip = ike_sa->get_virtual_ip(ike_sa, FALSE); ip = ike_sa->get_virtual_ip(ike_sa, FALSE);
if (ip)
{
ip = ip->clone(ip); ip = ip->clone(ip);
this->lock->write_lock(this->lock); this->lock->write_lock(this->lock);
ip = this->ips->put(this->ips, ip, ip); ip = this->ips->put(this->ips, ip, ip);
this->lock->unlock(this->lock); this->lock->unlock(this->lock);
DESTROY_IF(ip); DESTROY_IF(ip);
} }
}
return TRUE; return TRUE;
} }