[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YZpSlpVuE9G+Ebh4@unreal>
Date:   Sun, 21 Nov 2021 16:07:18 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc:     steffen.klassert@...unet.com, herbert@...dor.apana.org.au,
        antony.antony@...unet.com, davem@...emloft.net, kuba@...nel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next] xfrm: rework default policy structure
On Fri, Nov 19, 2021 at 06:31:18PM +0100, Nicolas Dichtel wrote:
> Le 19/11/2021 à 16:41, Leon Romanovsky a écrit :
> [snip]
> >> 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.
> 
> > if (!net->xfrm.policy_count[dir] ... -> if (net->xfrm.policy_count[dir] ...
> Hmm, are you sure?
Not sure at all, maybe wrong.
Thanks
Powered by blists - more mailing lists
 
