All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: steffen.klassert@secunet.com, herbert@gondor.apana.org.au,
	antony.antony@secunet.com, davem@davemloft.net, kuba@kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next] xfrm: rework default policy structure
Date: Sun, 21 Nov 2021 16:07:18 +0200	[thread overview]
Message-ID: <YZpSlpVuE9G+Ebh4@unreal> (raw)
In-Reply-To: <81eadf5e-7d2b-b7f8-513f-2212272f5897@6wind.com>

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

  reply	other threads:[~2021-11-21 14:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18 14:29 [PATCH net-next] xfrm: rework default policy structure Nicolas Dichtel
2021-11-18 19:09 ` Leon Romanovsky
2021-11-19  8:06   ` Nicolas Dichtel
2021-11-19 15:41     ` Leon Romanovsky
2021-11-19 17:31       ` Nicolas Dichtel
2021-11-21 14:07         ` Leon Romanovsky [this message]
2022-03-14 10:38           ` [PATCH ipsec-next v2] " Nicolas Dichtel
2022-03-15  8:32             ` Antony Antony
2022-03-18  6:27             ` Steffen Klassert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YZpSlpVuE9G+Ebh4@unreal \
    --to=leon@kernel.org \
    --cc=antony.antony@secunet.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=steffen.klassert@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.