author: Taehee Yoo <ap420073@gmail.com> 2021-07-09 17:35:18 +0000
committer: David S. Miller <davem@davemloft.net> 2021-07-09 13:55:53 -0700
commit: 67a9c94317402b826fc3db32afc8f39336803d97
parent: 9992a078b1771da354ac1f9737e1e639b687caa2
Commit Summary:
Diffstat:
1 file changed, 3 insertions, 1 deletion
diff --git a/include/net/dst_metadata.h b/include/net/dst_metadata.h
index 56cb3c38569a..14efa0ded75d 100644
--- a/include/net/dst_metadata.h
+++ b/include/net/dst_metadata.h
@@ -45,7 +45,9 @@ skb_tunnel_info(const struct sk_buff *skb)
return &md_dst->u.tun_info;
dst = skb_dst(skb);
- if (dst && dst->lwtstate)
+ if (dst && dst->lwtstate &&
+ (dst->lwtstate->type == LWTUNNEL_ENCAP_IP ||
+ dst->lwtstate->type == LWTUNNEL_ENCAP_IP6))
return lwt_tun_info(dst->lwtstate);
return NULL;