child-sa: pass traffic selector to add_sa() regardless of IPsec mode
This lets the kernel backend decide what to do with it, and in fact all kernel interfaces already handle this correctly.
This commit is contained in:
@@ -668,8 +668,6 @@ METHOD(child_sa_t, install, status_t,
|
|||||||
lifetime->time.rekey = 0;
|
lifetime->time.rekey = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->mode == MODE_BEET || this->mode == MODE_TRANSPORT)
|
|
||||||
{
|
|
||||||
/* BEET requires the bound address from the traffic selectors.
|
/* BEET requires the bound address from the traffic selectors.
|
||||||
* TODO: We add just the first traffic selector for now, as the
|
* TODO: We add just the first traffic selector for now, as the
|
||||||
* kernel accepts a single TS per SA only */
|
* kernel accepts a single TS per SA only */
|
||||||
@@ -683,7 +681,6 @@ METHOD(child_sa_t, install, status_t,
|
|||||||
my_ts->get_first(my_ts, (void**)&src_ts);
|
my_ts->get_first(my_ts, (void**)&src_ts);
|
||||||
other_ts->get_first(other_ts, (void**)&dst_ts);
|
other_ts->get_first(other_ts, (void**)&dst_ts);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
status = hydra->kernel_interface->add_sa(hydra->kernel_interface,
|
status = hydra->kernel_interface->add_sa(hydra->kernel_interface,
|
||||||
src, dst, spi, proto_ike2ip(this->protocol), this->reqid,
|
src, dst, spi, proto_ike2ip(this->protocol), this->reqid,
|
||||||
|
|||||||
Reference in New Issue
Block a user