From: Jakub Kicinski <kuba@kernel.org>
To: Victor Nogueira <victor@mojatatu.com>
Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
jhs@mojatatu.com, jiri@resnulli.us, horms@kernel.org,
yotam.gi@gmail.com, edragain@163.com, vega@nebusec.ai,
netdev@vger.kernel.org
Subject: Re: [PATCH net] net/sched: act_ife: use mac_len for ingress header offset
Date: Tue, 11 Aug 2026 17:45:52 -0700 [thread overview]
Message-ID: <20260811174552.21d08728@kernel.org> (raw)
In-Reply-To: <20260810144201.1563259-1-victor@mojatatu.com>
On Mon, 10 Aug 2026 11:42:01 -0300 Victor Nogueira wrote:
> On ingress, the L2 header stripped from the frame is skb->mac_len, not
> skb->dev->hard_header_len. Use it for the skb_push/skb_pull offsets in
> tcf_ife_encode()/tcf_ife_decode() and the matching header length inside
> ife_encode()/ife_decode(). On egress keep hard_header_len.
>
> For devices where hard_header_len differs from mac_len (e.g. PPP, which
> reports 4 vs 0), the previous code pushed/pulled the wrong amount and
> could hit skb_under_panic on ingress when headroom was tight.
Clashiko points out that act_ife operates on Ethernet headers
pretty explicitly. IOW we're fixing a crash in a case that
functionally won't work, anyway.
Should we not simply drop all the packets if they are are destined
for a non ARPHRD_ETHER device?
prev parent reply other threads:[~2026-08-12 0:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 14:42 [PATCH net] net/sched: act_ife: use mac_len for ingress header offset Victor Nogueira
2026-08-12 0:45 ` Jakub Kicinski [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=20260811174552.21d08728@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edragain@163.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vega@nebusec.ai \
--cc=victor@mojatatu.com \
--cc=yotam.gi@gmail.com \
/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