Netdev List
 help / color / mirror / Atom feed
* [PATCH] netfilter: flowtable: update skb csum after pppoe header push
@ 2026-12-03  9:49 lvjunyu
  2026-12-03  9:59 ` netdev-bot+sinfo
  0 siblings, 1 reply; 2+ messages in thread
From: lvjunyu @ 2026-12-03  9:49 UTC (permalink / raw)
  To: pablo; +Cc: fw, phil, netfilter-devel, netdev, coreteam, lvjunyu

nf_flow_pppoe_push() pushes a new PPPoE session header in front of
the packet data but does not fold it into skb->csum.

For CHECKSUM_COMPLETE skbs the checksum covers everything from
skb->data onwards, so after __skb_push(PPPOE_SES_HLEN) the 8 bytes
of the new header are not accounted for in skb->csum.  Any later
consumer doing incremental checksum updates on top of skb->csum
then starts from a stale initial value and can drop valid packets.

This is inconsistent with the sibling paths, which all keep the
checksum in sync: the vlan push path uses skb_postpush_rcsum() and
the vlan/pppoe pop paths use skb_pull_rcsum().

Mirror the vlan push path and use skb_postpush_rcsum() so the
pushed header is accounted for in CHECKSUM_COMPLETE skbs.  Call it
after the header fields are written, since it folds in the bytes
as they are at call time.

Fixes: 18d27bed0880 ("netfilter: flowtable: inline pppoe encapsulation in xmit path")
Signed-off-by: lvjunyu <lvjunyu@cmss.chinamobile.com>
---
 net/netfilter/nf_flow_table_ip.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/netfilter/nf_flow_table_ip.c b/net/netfilter/nf_flow_table_ip.c
index 19cafae748ab..a0b541b811b4 100644
--- a/net/netfilter/nf_flow_table_ip.c
+++ b/net/netfilter/nf_flow_table_ip.c
@@ -585,6 +585,8 @@ static int nf_flow_pppoe_push(struct sk_buff *skb, u16 id,
 	ph->proto	= proto;
 	skb->protocol	= htons(ETH_P_PPP_SES);
 
+	skb_postpush_rcsum(skb, skb->data, PPPOE_SES_HLEN);
+
 	return 0;
 }
 
-- 
2.43.0




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

* Re: [PATCH] netfilter: flowtable: update skb csum after pppoe header push
  2026-12-03  9:49 [PATCH] netfilter: flowtable: update skb csum after pppoe header push lvjunyu
@ 2026-12-03  9:59 ` netdev-bot+sinfo
  0 siblings, 0 replies; 2+ messages in thread
From: netdev-bot+sinfo @ 2026-12-03  9:59 UTC (permalink / raw)
  To: lvjunyu; +Cc: pablo, fw, phil, netfilter-devel, netdev, coreteam

Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - How the issue was discovered, e.g. hit in production, hit during
   development, syzbot report, manual code inspection, LLM or static
   analysis tool scan.

 - Whether the issue was actually triggered, or is only theoretical
   (e.g. found by LLM and not proven at runtime). If it was triggered
   please include the symptoms, like the stack trace or kernel messages.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.

*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
-- 
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.

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

end of thread, other threads:[~2026-12-03  9:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03  9:49 [PATCH] netfilter: flowtable: update skb csum after pppoe header push lvjunyu
2026-12-03  9:59 ` netdev-bot+sinfo

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