stroke: support %dynamic in left/rightsubnet for dynamic selectors
This has the same meaning as omitting left/rightsubnet, i.e. replace it by the IKE address. Supporting %dynamic allows configurations with multiple dynamic selectors in a left/rightsubnet, each with potentially different proto/port selectors.
This commit is contained in:
@@ -1020,8 +1020,16 @@ static void add_ts(private_stroke_config_t *this,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ts = traffic_selector_create_from_cidr(subnet, proto,
|
if (streq(subnet, "%dynamic"))
|
||||||
from_port, to_port);
|
{
|
||||||
|
ts = traffic_selector_create_dynamic(proto,
|
||||||
|
from_port, to_port);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ts = traffic_selector_create_from_cidr(subnet, proto,
|
||||||
|
from_port, to_port);
|
||||||
|
}
|
||||||
if (ts)
|
if (ts)
|
||||||
{
|
{
|
||||||
child_cfg->add_traffic_selector(child_cfg, local, ts);
|
child_cfg->add_traffic_selector(child_cfg, local, ts);
|
||||||
|
|||||||
Reference in New Issue
Block a user