From: Julian Anastasov <ja@ssi.bg>
To: Yizhou Zhao <zhaoyz24@mails.tsinghua.edu.cn>
Cc: netdev@vger.kernel.org, coreteam@netfilter.org,
davem@davemloft.net, edumazet@google.com, fengxw06@126.com,
fw@strlen.de, horms@verge.net.au, kuba@kernel.org,
linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org,
netfilter-devel@vger.kernel.org, pabeni@redhat.com,
pablo@netfilter.org, phil@nwl.cc, qli01@tsinghua.edu.cn,
stable@vger.kernel.org, wangao@seu.edu.cn, xuke@tsinghua.edu.cn,
yangyx22@mails.tsinghua.edu.cn
Subject: Re: [PATCH nf v2 0/3] ipvs: use parsed transport offsets in state handlers
Date: Tue, 7 Jul 2026 16:51:06 +0300 (EEST) [thread overview]
Message-ID: <f1ca1fbd-b8db-a012-3db1-c5aa7d579408@ssi.bg> (raw)
In-Reply-To: <20260706101624.69471-1-zhaoyz24@mails.tsinghua.edu.cn>
Hello,
On Mon, 6 Jul 2026, Yizhou Zhao wrote:
> IPVS parses packets into struct ip_vs_iphdr before scheduling and state
> handling. For IPv6, iph.len contains the real transport-header offset
> after ipv6_find_hdr() has skipped any extension headers.
>
> TCP and SCTP state handlers still recompute their own transport offsets.
> They use sizeof(struct ipv6hdr) for IPv6, so packets with extension
> headers make the state machines read the wrong bytes.
>
> Pass the parsed transport offset through the common IPVS state handling
> callback, then use it in the TCP and SCTP state lookups.
>
> Changes in v2:
> - Pass the parsed transport offset through ip_vs_set_state() and the
> protocol callbacks.
> - Fix TCP state handling as well as SCTP.
> - Avoid reparsing the skb in SCTP state handling.
> - Split the common plumbing, TCP fix and SCTP fix into a 3-patch series.
>
> Yizhou Zhao (3):
> ipvs: pass parsed transport offset to state handlers
> ipvs: use parsed transport offset in TCP state lookup
> ipvs: use parsed transport offset in SCTP state lookup
>
> include/net/ip_vs.h | 3 ++-
> net/netfilter/ipvs/ip_vs_core.c | 10 +++++-----
> net/netfilter/ipvs/ip_vs_proto_sctp.c | 18 +++++++-----------
> net/netfilter/ipvs/ip_vs_proto_tcp.c | 11 +++--------
> net/netfilter/ipvs/ip_vs_proto_udp.c | 3 ++-
> 5 files changed, 19 insertions(+), 26 deletions(-)
The patchset looks good to me, thanks!
Acked-by: Julian Anastasov <ja@ssi.bg>
The Sashiko comments need additional fixes:
https://sashiko.dev/#/patchset/20260706101624.69471-1-zhaoyz24%40mails.tsinghua.edu.cn
Regards
--
Julian Anastasov <ja@ssi.bg>
prev parent reply other threads:[~2026-07-07 13:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 10:16 [PATCH nf v2 0/3] ipvs: use parsed transport offsets in state handlers Yizhou Zhao
2026-07-06 10:16 ` [PATCH nf v2 1/3] ipvs: pass parsed transport offset to " Yizhou Zhao
2026-07-06 10:16 ` [PATCH nf v2 2/3] ipvs: use parsed transport offset in TCP state lookup Yizhou Zhao
2026-07-06 10:16 ` [PATCH nf v2 3/3] ipvs: use parsed transport offset in SCTP " Yizhou Zhao
2026-07-07 13:51 ` Julian Anastasov [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=f1ca1fbd-b8db-a012-3db1-c5aa7d579408@ssi.bg \
--to=ja@ssi.bg \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fengxw06@126.com \
--cc=fw@strlen.de \
--cc=horms@verge.net.au \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvs-devel@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 \
--cc=qli01@tsinghua.edu.cn \
--cc=stable@vger.kernel.org \
--cc=wangao@seu.edu.cn \
--cc=xuke@tsinghua.edu.cn \
--cc=yangyx22@mails.tsinghua.edu.cn \
--cc=zhaoyz24@mails.tsinghua.edu.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox