From: Antonio Quartulli <antonio@openvpn.net>
To: netdev@vger.kernel.org
Cc: edumazet@google.com, sd@queasysnail.net, davem@davemloft.net,
kuba@kernel.org, pabeni@redhat.com, ralf@mandelbit.com,
Qingfang Deng <qingfang.deng@linux.dev>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Minqiang Chen <ptpt52@gmail.com>,
Antonio Quartulli <antonio@openvpn.net>
Subject: [PATCH net 1/3] ovpn: reset MAC header before passing skb up
Date: Tue, 5 May 2026 01:03:03 +0200 [thread overview]
Message-ID: <20260504230305.2681646-2-antonio@openvpn.net> (raw)
In-Reply-To: <20260504230305.2681646-1-antonio@openvpn.net>
From: Qingfang Deng <qingfang.deng@linux.dev>
After decapsulating a packet, the skb->mac_header still points to the
outer transport header.
Fix this by calling skb_reset_mac_header() in ovpn_netdev_write() to
ensure the MAC header points to the beginning of
the inner IP/network packet, as expected by the rest of the stack.
Reported-by: Minqiang Chen <ptpt52@gmail.com>
Fixes: 8534731dbf2d ("ovpn: implement packet processing")
Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
---
drivers/net/ovpn/io.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ovpn/io.c b/drivers/net/ovpn/io.c
index db43a1f8a07a..d92bb87be2b2 100644
--- a/drivers/net/ovpn/io.c
+++ b/drivers/net/ovpn/io.c
@@ -85,6 +85,7 @@ static void ovpn_netdev_write(struct ovpn_peer *peer, struct sk_buff *skb)
skb_scrub_packet(skb, true);
/* network header reset in ovpn_decrypt_post() */
+ skb_reset_mac_header(skb);
skb_reset_transport_header(skb);
skb_reset_inner_headers(skb);
--
2.53.0
next prev parent reply other threads:[~2026-05-04 23:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 23:03 [PATCH net 0/3] pull request: fixes for ovpn 2026-05-04 Antonio Quartulli
2026-05-04 23:03 ` Antonio Quartulli [this message]
2026-05-04 23:03 ` [PATCH net 2/3] ovpn: ensure packet delivery happens with BH disabled Antonio Quartulli
2026-05-04 23:03 ` [PATCH net 3/3] selftests: ovpn: reduce ping count in test.sh Antonio Quartulli
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=20260504230305.2681646-2-antonio@openvpn.net \
--to=antonio@openvpn.net \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ptpt52@gmail.com \
--cc=qingfang.deng@linux.dev \
--cc=ralf@mandelbit.com \
--cc=sd@queasysnail.net \
/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