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

Mehmet Basaran mehmet.basaran at canonical.com
Wed Apr 15 09:40:14 UTC 2026


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

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: f842901be344 ("ip6_tunnel: use skb_vlan_inet_prepare() in __ip6_tnl_rcv()")
Signed-off-by: Mehmet Basaran <mehmet.basaran 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 8a04feb2810b..d49d4637e6c7 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -844,7 +844,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