On Fri, Nov 19, 2021 at 06:31:18PM +0100, Nicolas Dichtel wrote:
Le 19/11/2021 à 16:41, Leon Romanovsky a écrit :
[snip]
quoted
quoted
What about:
static inline bool __xfrm_check_nopolicy(struct net *net, struct sk_buff *skb,
int dir)
{
if (!net->xfrm.policy_count[dir] && !secpath_exists(skb))
return net->xfrm.policy_default[dir] == XFRM_USERPOLICY_ACCEPT;
return false;
}
It is much better, just extra "!" is not in place.
Ok, I will send a v2 with that.
quoted
if (!net->xfrm.policy_count[dir] ... -> if (net->xfrm.policy_count[dir] ...
Hmm, are you sure?
Not sure at all, maybe wrong.
Thanks