Message ID | 20220106091350.3038869-4-steffen.klassert@secunet.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ac1077e92825bb0ffeee8550a41771df772214ce |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [1/7] ipv6/esp6: Remove structure variables and alignment statements | expand |
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index edc673e78114..9341298b2a70 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -2680,7 +2680,7 @@ static int xfrm_expand_policies(const struct flowi *fl, u16 family, *num_xfrms = pols[0]->xfrm_nr; #ifdef CONFIG_XFRM_SUB_POLICY - if (pols[0] && pols[0]->action == XFRM_POLICY_ALLOW && + if (pols[0]->action == XFRM_POLICY_ALLOW && pols[0]->type != XFRM_POLICY_TYPE_MAIN) { pols[1] = xfrm_policy_lookup_bytype(xp_net(pols[0]), XFRM_POLICY_TYPE_MAIN,