As we always negotiate virtual IPs in charon, having both left- and
rightsourceip is not allowed. Both in IKEv1 and IKEv2 we support a single
configuration payload exchange only.
enumerator->destroy(enumerator);
}
- if (msg->add_conn.me.sourceip)
+ if (msg->add_conn.me.sourceip && msg->add_conn.other.sourceip)
+ {
+ DBG1(DBG_CFG, "'%s' has both left- and rightsourceip, but IKE can "
+ "negotiate one virtual IP only, ignoring local virtual IP",
+ msg->add_conn.name);
+ }
+ else if (msg->add_conn.me.sourceip)
{
enumerator_t *enumerator;
char *token;