public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter•org>
To: Gavrilov Ilia <Ilia.Gavrilov@infotecs•ru>
Cc: Jozsef Kadlecsik <kadlec@netfilter•org>,
	Florian Westphal <fw@strlen•de>,
	"David S. Miller" <davem@davemloft•net>,
	Eric Dumazet <edumazet@google•com>,
	Jakub Kicinski <kuba@kernel•org>, Paolo Abeni <pabeni@redhat•com>,
	Patrick McHardy <kaber@trash•net>,
	"netfilter-devel@vger•kernel.org"
	<netfilter-devel@vger•kernel.org>,
	"coreteam@netfilter•org" <coreteam@netfilter•org>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
	"lvc-project@linuxtesting•org" <lvc-project@linuxtesting•org>,
	Simon Horman <simon.horman@corigine•com>
Subject: Re: [PATCH net] netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value.
Date: Mon, 26 Jun 2023 17:19:13 +0200	[thread overview]
Message-ID: <ZJmscRFjubRPUgiw@calendula> (raw)
In-Reply-To: <20230623112247.1468836-1-Ilia.Gavrilov@infotecs.ru>

On Fri, Jun 23, 2023 at 11:23:46AM +0000, Gavrilov Ilia wrote:
> From: "Ilia.Gavrilov" <Ilia.Gavrilov@infotecs•ru>
> 
> ct_sip_parse_numerical_param() returns only 0 or 1 now.
> But process_register_request() and process_register_response() imply
> checking for a negative value if parsing of a numerical header parameter
> failed.
> The invocation in nf_nat_sip() looks correct:
>  	if (ct_sip_parse_numerical_param(...) > 0 &&
>  	    ...) { ... }
> 
> Make the return value of the function ct_sip_parse_numerical_param()
> a tristate to fix all the cases
> a) return 1 if value is found; *val is set
> b) return 0 if value is not found; *val is unchanged
> c) return -1 on error; *val is undefined

Applied to nf.git

      reply	other threads:[~2023-06-26 15:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23 11:23 [PATCH net] netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value Gavrilov Ilia
2023-06-26 15:19 ` Pablo Neira Ayuso [this message]

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=ZJmscRFjubRPUgiw@calendula \
    --to=pablo@netfilter$(echo .)org \
    --cc=Ilia.Gavrilov@infotecs$(echo .)ru \
    --cc=coreteam@netfilter$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=fw@strlen$(echo .)de \
    --cc=kaber@trash$(echo .)net \
    --cc=kadlec@netfilter$(echo .)org \
    --cc=kuba@kernel$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=lvc-project@linuxtesting$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=netfilter-devel@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=simon.horman@corigine$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox