]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ovpn: reset MAC header before passing skb up
authorQingfang Deng <qingfang.deng@linux.dev>
Mon, 27 Apr 2026 04:00:11 +0000 (12:00 +0800)
committerAntonio Quartulli <antonio@openvpn.net>
Mon, 4 May 2026 22:31:05 +0000 (00:31 +0200)
commita200cdbf95932631ec338d08a6e9e31b34c4e8a6
tree0e05f4add0f213ea66b7448fbe9ae1441519e6db
parentbd3a4795d5744f59a1f485379f1303e5e606f377
ovpn: reset MAC header before passing skb up

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