When there is no policy configured on the system, the default policy is checked in xfrm_route_forward. However, it was done with the wrong direction (XFRM_POLICY_FWD instead of XFRM_POLICY_OUT). The default policy for XFRM_POLICY_FWD was checked just before, with a call to xfrm[46]_policy_check().
Showing the changes to include (1 of 1 file). Show all
Unified · Split
| @@ -1162,7 +1162,7 @@ static inline int xfrm_route_forward(struct sk_buff *skb, unsigned short family) · 1161 unmodified lines | ||
| 1162 | 1162 | { |
| 1163 | 1163 | struct net *net = dev_net(skb->dev); |
| 1164 | 1164 | |
| 1165 | − if (xfrm_default_allow(net, XFRM_POLICY_FWD)) | |
| 1165 | + if (xfrm_default_allow(net, XFRM_POLICY_OUT)) | |
| 1166 | 1166 | return !net->xfrm.policy_count[XFRM_POLICY_OUT] || |
| 1167 | 1167 | (skb_dst(skb)->flags & DST_NOXFRM) || |
| 1168 | 1168 | __xfrm_route_forward(skb, family); |