From: Rahul <rc@rexion.ai>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Phil Sutter <phil@nwl.cc>, 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>,
Simon Horman <horms@kernel.org>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 1/4] netfilter: conntrack: add shared port and uint parsers for helpers
Date: Sun, 24 May 2026 11:14:57 +0000 (UTC) [thread overview]
Message-ID: <4gNbyT3lKNz8sX8@mail.spacemail.com> (raw)
In-Reply-To: <afpwLbN-W2Sur5Qu@chamomile>
On Sun, May 03, 2026, Pablo Neira Ayuso wrote:
> You will need a "real name" here.
> In nf.git, there is a new function sip_strtouint() that can possibly
> be moved to nf_conntrack_helper.c.
Apologies — my name is Rahul. v4 will use "Rahul <rc@rexion.ai>"
throughout.
I looked at 8cf6809cddcb ("netfilter: nf_conntrack_sip: don't use
simple_strtoul"). Florian's patch adds two local helpers:
- sip_strtouint(): generic bounded uint parser, used for expires,
cseq, clen, code, and port in process_sdp().
- sip_parse_port(): port-specific wrapper around sip_strtouint(),
used in epaddr_len(), ct_sip_parse_request(), and
ct_sip_parse_header_uri().
My v3 patch 4 already converts ct_sip_parse_request() and
ct_sip_parse_header_uri() to use nf_ct_helper_parse_port(), which
overlaps with what sip_parse_port() does.
Would it make sense to:
1. Align nf_ct_helper_parse_uint() with sip_strtouint()'s design
(same endp-on-error semantics, UINT_MAX cap) and export it.
2. In patch 4, drop sip_strtouint() from nf_conntrack_sip.c and
replace all its call sites with nf_ct_helper_parse_uint(), and
replace sip_parse_port() with nf_ct_helper_parse_port()?
That would consolidate both local helpers into the shared core and
avoid the overlap. I am happy to send a v4 along those lines if that
is the direction you prefer.
Thanks,
Rahul
next prev parent reply other threads:[~2026-05-24 11:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-01 6:31 [PATCH net-next v2 0/3] netfilter: conntrack: add shared port parser and use it in IRC and Amanda helpers HACKE-RC
2026-05-01 6:31 ` [PATCH net-next v2 1/3] netfilter: conntrack: add shared port parser for helpers HACKE-RC
2026-05-01 10:25 ` Phil Sutter
2026-05-01 6:31 ` [PATCH net-next v2 2/3] netfilter: nf_conntrack_irc: use nf_ct_helper_parse_port() HACKE-RC
2026-05-01 6:31 ` [PATCH net-next v2 3/3] netfilter: nf_conntrack_amanda: " HACKE-RC
2026-05-01 10:34 ` [PATCH net-next v2 0/3] netfilter: conntrack: add shared port parser and use it in IRC and Amanda helpers Phil Sutter
2026-05-03 8:32 ` [PATCH net-next v3 0/4] netfilter: conntrack: shared port parser for helpers HACKE-RC
2026-05-03 8:32 ` [PATCH net-next v3 1/4] netfilter: conntrack: add shared port and uint parsers " HACKE-RC
2026-05-05 22:33 ` Pablo Neira Ayuso
2026-05-24 11:14 ` Rahul [this message]
2026-05-03 8:32 ` [PATCH net-next v3 2/4] netfilter: nf_conntrack_irc: use nf_ct_helper_parse_port() HACKE-RC
2026-05-03 8:32 ` [PATCH net-next v3 3/4] netfilter: nf_conntrack_amanda: " HACKE-RC
2026-05-03 8:32 ` [PATCH net-next v3 4/4] netfilter: nf_conntrack_sip: " HACKE-RC
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=4gNbyT3lKNz8sX8@mail.spacemail.com \
--to=rc@rexion.ai \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
/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.