Netdev List
 help / color / mirror / Atom feed
* [PATCH nf v2 0/3] ipvs: use parsed transport offsets in state handlers
@ 2026-07-06 10:16 Yizhou Zhao
  2026-07-06 10:16 ` [PATCH nf v2 1/3] ipvs: pass parsed transport offset to " Yizhou Zhao
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Yizhou Zhao @ 2026-07-06 10:16 UTC (permalink / raw)
  To: netdev
  Cc: coreteam, davem, edumazet, fengxw06, fw, horms, ja, kuba,
	linux-kernel, lvs-devel, netfilter-devel, pabeni, pablo, phil,
	qli01, stable, wangao, xuke, yangyx22, Yizhou Zhao

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(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-07-07 13:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH nf v2 0/3] ipvs: use parsed transport offsets in state handlers Julian Anastasov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox