ikev1: Store fallback identity (IP address) on IKE_SA's auth-cfg
The other auth-cfg object is shared via peer-cfg, so we must not modify it. It's only stored to simplify memory management. Fixes #3394.
This commit is contained in:
@@ -629,6 +629,7 @@ METHOD(phase1_t, get_id, identification_t*,
|
|||||||
if (!me->is_anyaddr(me))
|
if (!me->is_anyaddr(me))
|
||||||
{
|
{
|
||||||
id = identification_create_from_sockaddr(me->get_sockaddr(me));
|
id = identification_create_from_sockaddr(me->get_sockaddr(me));
|
||||||
|
auth = this->ike_sa->get_auth_cfg(this->ike_sa, TRUE);
|
||||||
auth->add(auth, AUTH_RULE_IDENTITY, id);
|
auth->add(auth, AUTH_RULE_IDENTITY, id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user