kernel-pfkey: Only install templates for regular IPsec policies with reqid
This commit is contained in:
committed by
Andreas Steffen
parent
638b4638e3
commit
0ff8ce9452
@@ -2428,6 +2428,8 @@ static status_t add_policy_internal(private_kernel_pfkey_ipsec_t *this,
|
||||
pol->sadb_x_policy_priority = mapping->priority;
|
||||
#endif
|
||||
|
||||
if (mapping->type == POLICY_IPSEC && ipsec->cfg.reqid)
|
||||
{
|
||||
/* one or more sadb_x_ipsecrequest extensions are added to the
|
||||
* sadb_x_policy extension */
|
||||
proto_mode = ipsec->cfg.mode;
|
||||
@@ -2475,6 +2477,7 @@ static status_t add_policy_internal(private_kernel_pfkey_ipsec_t *this,
|
||||
}
|
||||
|
||||
pol->sadb_x_policy_len += PFKEY_LEN(req->sadb_x_ipsecrequest_len);
|
||||
}
|
||||
PFKEY_EXT_ADD(msg, pol);
|
||||
|
||||
add_addr_ext(msg, policy->src.net, SADB_EXT_ADDRESS_SRC, policy->src.proto,
|
||||
|
||||
Reference in New Issue
Block a user