kernel-netlink: Don't install routes for CHILD_SAs with interface ID

This commit is contained in:
Tobias Brunner
2019-04-04 09:31:38 +02:00
parent 5b2078ad09
commit 801a5d3133
2 changed files with 5 additions and 1 deletions
@@ -2846,10 +2846,12 @@ static status_t add_policy_internal(private_kernel_netlink_ipsec_t *this,
* - this is an outbound policy (to just get one for each child)
* - routing is not disabled via strongswan.conf
* - the selector is not for a specific protocol/port
* - no XFRM interface ID is configured
* - we are in tunnel/BEET mode or install a bypass policy
*/
if (policy->direction == POLICY_OUT && this->install_routes &&
!policy->sel.proto && !policy->sel.dport && !policy->sel.sport)
!policy->sel.proto && !policy->sel.dport && !policy->sel.sport &&
!policy->if_id)
{
if (mapping->type == POLICY_PASS ||
(mapping->type == POLICY_IPSEC && ipsec->cfg.mode != MODE_TRANSPORT))