All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: dccp@vger.kernel.org
Subject: Re: [PATCH] [NETFILTER]: Keep conntrack reference until IPsecv6 policy checks are done
Date: Wed, 01 Mar 2023 15:07:47 +0000	[thread overview]
Message-ID: <20230301150747.GB4691@breakpoint.cc> (raw)
In-Reply-To: <20230301145534.421569-1-madhu.koriginja@nxp.com>

Madhu Koriginja <madhu.koriginja@nxp.com> wrote:
> Keep the conntrack reference until policy checks have been performed for
> IPsec V6 NAT support. The reference needs to be dropped before a packet is
> queued to avoid having the conntrack module unloadable.

In the old days there was no ipv6 nat so its not surpising
that ipv6 discards the conntrack entry earlier than ipv4.

> -		if (!(ipprot->flags & INET6_PROTO_NOPOLICY) &&
> -		    !xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb))
> -			goto discard;
> +
> +		if (!ipprot->flags & INET6_PROTO_NOPOLICY) {

This looks wrong, why did you drop the () ?

if (!(ipprot->flags & INET6_PROTO_NOPOLICY)) { ...

rest LGTM.

WARNING: multiple messages have this Message-ID (diff)
From: Florian Westphal <fw@strlen.de>
To: Madhu Koriginja <madhu.koriginja@nxp.com>
Cc: gerrit@erg.abdn.ac.uk, davem@davemloft.net, kuznet@ms2.inr.ac.ru,
	yoshfuji@linux-ipv6.org, edumazet@google.com,
	dccp@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, vani.namala@nxp.com
Subject: Re: [PATCH] [NETFILTER]: Keep conntrack reference until IPsecv6 policy checks are done
Date: Wed, 1 Mar 2023 16:07:47 +0100	[thread overview]
Message-ID: <20230301150747.GB4691@breakpoint.cc> (raw)
In-Reply-To: <20230301145534.421569-1-madhu.koriginja@nxp.com>

Madhu Koriginja <madhu.koriginja@nxp.com> wrote:
> Keep the conntrack reference until policy checks have been performed for
> IPsec V6 NAT support. The reference needs to be dropped before a packet is
> queued to avoid having the conntrack module unloadable.

In the old days there was no ipv6 nat so its not surpising
that ipv6 discards the conntrack entry earlier than ipv4.

> -		if (!(ipprot->flags & INET6_PROTO_NOPOLICY) &&
> -		    !xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb))
> -			goto discard;
> +
> +		if (!ipprot->flags & INET6_PROTO_NOPOLICY) {

This looks wrong, why did you drop the () ?

if (!(ipprot->flags & INET6_PROTO_NOPOLICY)) { ...

rest LGTM.

  reply	other threads:[~2023-03-01 15:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 14:55 [PATCH] [NETFILTER]: Keep conntrack reference until IPsecv6 policy checks are done Madhu Koriginja
2023-03-01 14:56 ` Madhu Koriginja
2023-03-01 15:07 ` Florian Westphal [this message]
2023-03-01 15:07   ` Florian Westphal
  -- strict thread matches above, loose matches on Subject: below --
2023-03-01 15:19 [EXT] " Madhu Koriginja
2023-03-01 15:19 ` Madhu Koriginja
2023-03-01 15:25 ` Florian Westphal
2023-03-01 15:25   ` Florian Westphal

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=20230301150747.GB4691@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=dccp@vger.kernel.org \
    /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.