[REGR-FIX J][PATCH 1/1] UBUNTU: SAUCE: Fix skb_vlan_inet_prepare() usage

Stefan Bader stefan.bader at canonical.com
Tue Mar 10 22:16:44 UTC 2026


BugLink: https://bugs.launchpad.net/bugs/2143343

Upstream stable changed net/ipv6/ip6_tunnel.c to use
skb_vlan_inet_prepare() instead of pskb_inet_may_pull().
However for newer kernels this change was made after
  "net: tunnel: make skb_vlan_inet_prepare() return drop reasons"
which changed the return value of skb_blan_inet_prepare() from
boolean to int. Which means successful execution is signalled
by rc=0 which is false.
To keep delta minimal, just change the expected return value to
assume success when true is returned. This stops incorrect drops.

Fixes: 134d7f22da48 "ip6_tunnel: use skb_vlan_inet_prepare() in __ip6_tnl_rcv()"
Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
---
 net/ipv6/ip6_tunnel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 553851e3aca1..7c1b5d01f820 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -846,7 +846,7 @@ static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb,
 
 	skb_reset_network_header(skb);
 
-	if (skb_vlan_inet_prepare(skb, true)) {
+	if (!skb_vlan_inet_prepare(skb, true)) {
 		DEV_STATS_INC(tunnel->dev, rx_length_errors);
 		DEV_STATS_INC(tunnel->dev, rx_errors);
 		goto drop;
-- 
2.43.0




More information about the kernel-team mailing list