On Fri, Sep 05, 2025 at 03:30:55PM +0200, Ilya Maximets wrote:
> @@ -220,9 +221,15 @@ static inline struct metadata_dst *ip_tun_rx_dst(struct
> sk_buff *skb,
> int md_size)
> {
> const struct iphdr *iph = ip_hdr(skb);
> + struct metadata_dst *tun_dst;
> +
> + tun_dst = __ip_tun_set_dst(iph->saddr, iph->daddr, iph->tos, iph->ttl,
> + 0, flags, tunnel_id, md_size);
>
> - return __ip_tun_set_dst(iph->saddr, iph->daddr, iph->tos, iph->ttl,
> - 0, flags, tunnel_id, md_size);
> + if (iph->frag_off & htons(IP_DF))
> + __set_bit(IP_TUNNEL_DONT_FRAGMENT_BIT,
> + tun_dst->u.tun_info.key.tun_flags);
Shouldn't you check that tun_dst isn't NULL?
> + return tun_dst;
> }