/*
- * Copyright (C) 2007-2018 Tobias Brunner
+ * Copyright (C) 2007-2019 Tobias Brunner
* Copyright (C) 2005-2009 Martin Willi
* Copyright (C) 2005 Jan Hutter
* HSR Hochschule fuer Technik Rapperswil
*/
linked_list_t *remote_auth;
+ /**
+ * Optionl interface ID to use for inbound CHILD_SA
+ */
+ uint32_t if_id_in;
+
+ /**
+ * Optionl interface ID to use for outbound CHILD_SA
+ */
+ uint32_t if_id_out;
+
/**
* PPK ID
*/
return this->remote_auth->create_enumerator(this->remote_auth);
}
+METHOD(peer_cfg_t, get_if_id, uint32_t,
+ private_peer_cfg_t *this, bool inbound)
+{
+ return inbound ? this->if_id_in : this->if_id_out;
+}
+
METHOD(peer_cfg_t, get_ppk_id, identification_t*,
private_peer_cfg_t *this)
{
this->aggressive == other->aggressive &&
this->pull_mode == other->pull_mode &&
auth_cfg_equal(this, other) &&
+ this->if_id_in == other->if_id_in &&
+ this->if_id_out == other->if_id_out &&
this->ppk_required == other->ppk_required &&
id_equal(this->ppk_id, other->ppk_id)
#ifdef ME
.create_pool_enumerator = _create_pool_enumerator,
.add_auth_cfg = _add_auth_cfg,
.create_auth_cfg_enumerator = _create_auth_cfg_enumerator,
+ .get_if_id = _get_if_id,
.get_ppk_id = _get_ppk_id,
.ppk_required = _ppk_required,
.equals = (void*)_equals,
.pull_mode = !data->push_mode,
.dpd = data->dpd,
.dpd_timeout = data->dpd_timeout,
+ .if_id_in = data->if_id_in,
+ .if_id_out = data->if_id_out,
.ppk_id = data->ppk_id,
.ppk_required = data->ppk_required,
.vips = linked_list_create(),
/*
- * Copyright (C) 2007-2018 Tobias Brunner
+ * Copyright (C) 2007-2019 Tobias Brunner
* Copyright (C) 2005-2009 Martin Willi
* Copyright (C) 2005 Jan Hutter
* HSR Hochschule fuer Technik Rapperswil
*/
enumerator_t* (*create_pool_enumerator)(peer_cfg_t *this);
+ /**
+ * Optional interface ID to set on policies/SAs.
+ *
+ * @param inbound TRUE for inbound, FALSE for outbound
+ * @return interface ID
+ */
+ uint32_t (*get_if_id)(peer_cfg_t *this, bool inbound);
+
/**
* Get the PPK ID to use with this peer.
*
uint32_t dpd;
/** DPD timeout interval (IKEv1 only), if 0 default applies */
uint32_t dpd_timeout;
+ /** Optional inbound interface ID */
+ uint32_t if_id_in;
+ /** Optional outbound interface ID */
+ uint32_t if_id_out;
/** Postquantum Preshared Key ID (adopted) */
identification_t *ppk_id;
/** TRUE if a PPK is required, FALSE if it's optional */