kernel-interface: Optionally pass security label with an acquire
This commit is contained in:
@@ -37,6 +37,8 @@ struct kernel_acquire_data_t {
|
|||||||
traffic_selector_t *src;
|
traffic_selector_t *src;
|
||||||
/** Optional destination of the triggering packet */
|
/** Optional destination of the triggering packet */
|
||||||
traffic_selector_t *dst;
|
traffic_selector_t *dst;
|
||||||
|
/** Optional security label of the triggering packet */
|
||||||
|
sec_label_t *label;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ METHOD(job_t, destroy, void,
|
|||||||
{
|
{
|
||||||
DESTROY_IF(this->data.src);
|
DESTROY_IF(this->data.src);
|
||||||
DESTROY_IF(this->data.dst);
|
DESTROY_IF(this->data.dst);
|
||||||
|
DESTROY_IF(this->data.label);
|
||||||
free(this);
|
free(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,7 +89,10 @@ acquire_job_t *acquire_job_create(uint32_t reqid, kernel_acquire_data_t *data)
|
|||||||
{
|
{
|
||||||
this->data.dst = this->data.dst->clone(this->data.dst);
|
this->data.dst = this->data.dst->clone(this->data.dst);
|
||||||
}
|
}
|
||||||
|
if (this->data.label)
|
||||||
|
{
|
||||||
|
this->data.label = this->data.label->clone(this->data.label);
|
||||||
|
}
|
||||||
|
|
||||||
return &this->public;
|
return &this->public;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user