kernel/net/ipv6/icmp.c
.. .. @@ -429,7 +429,10 @@ 429 429 if (unlikely(dev->ifindex == LOOPBACK_IFINDEX || netif_is_l3_master(skb->dev))) { 430 430 const struct rt6_info *rt6 = skb_rt6_info(skb); 431 431 432 - if (rt6)432 + /* The destination could be an external IP in Ext Hdr (SRv6, RPL, etc.),433 + * and ip6_null_entry could be set to skb if no route is found.434 + */435 + if (rt6 && rt6->rt6i_idev)433 436 dev = rt6->rt6i_idev->dev; 434 437 } 435 438