kernel-interface: Add members for optional acquire sequence number
This commit is contained in:
@@ -56,22 +56,26 @@ static inline protocol_id_t proto_ip2ike(uint8_t protocol)
|
||||
METHOD(kernel_listener_t, acquire, bool,
|
||||
private_kernel_handler_t *this, uint32_t reqid, kernel_acquire_data_t *data)
|
||||
{
|
||||
char buf[BUF_LEN] = "";
|
||||
char buf[BUF_LEN] = "", sbuf[BUF_LEN] = "";
|
||||
|
||||
if (data->label)
|
||||
{
|
||||
snprintf(buf, sizeof(buf), ", label {%s}",
|
||||
data->label->get_string(data->label));
|
||||
}
|
||||
if (data->seq)
|
||||
{
|
||||
snprintf(sbuf, sizeof(sbuf), ", seq {%u}", data->seq);
|
||||
}
|
||||
if (data->src && data->dst)
|
||||
{
|
||||
DBG1(DBG_KNL, "creating acquire job for policy %R === %R with "
|
||||
"reqid {%u}%s", data->src, data->dst, reqid, buf);
|
||||
"reqid {%u}%s%s", data->src, data->dst, reqid, buf, sbuf);
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG1(DBG_KNL, "creating acquire job for policy with reqid {%u}%s",
|
||||
reqid, buf);
|
||||
DBG1(DBG_KNL, "creating acquire job for policy with reqid {%u}%s%s",
|
||||
reqid, buf, sbuf);
|
||||
}
|
||||
lib->processor->queue_job(lib->processor,
|
||||
(job_t*)acquire_job_create(reqid, data));
|
||||
|
||||
@@ -67,6 +67,8 @@ struct kernel_ipsec_sa_id_t {
|
||||
struct kernel_ipsec_add_sa_t {
|
||||
/** Reqid */
|
||||
uint32_t reqid;
|
||||
/** Optional sequence number associated with the acquire triggering the SA */
|
||||
uint32_t seq;
|
||||
/** Mode (tunnel, transport...) */
|
||||
ipsec_mode_t mode;
|
||||
/** List of source traffic selectors */
|
||||
|
||||
@@ -40,6 +40,8 @@ struct kernel_acquire_data_t {
|
||||
traffic_selector_t *dst;
|
||||
/** Optional security label of the triggering packet */
|
||||
sec_label_t *label;
|
||||
/** Optional sequence number associated with the acquire */
|
||||
uint32_t seq;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user