hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/net/ipv4/route.c
....@@ -1240,6 +1240,7 @@
12401240
12411241 static void ipv4_send_dest_unreach(struct sk_buff *skb)
12421242 {
1243
+ struct net_device *dev;
12431244 struct ip_options opt;
12441245 int res;
12451246
....@@ -1257,7 +1258,8 @@
12571258 opt.optlen = ip_hdr(skb)->ihl * 4 - sizeof(struct iphdr);
12581259
12591260 rcu_read_lock();
1260
- res = __ip_options_compile(dev_net(skb->dev), &opt, skb, NULL);
1261
+ dev = skb->dev ? skb->dev : skb_rtable(skb)->dst.dev;
1262
+ res = __ip_options_compile(dev_net(dev), &opt, skb, NULL);
12611263 rcu_read_unlock();
12621264
12631265 if (res)
....@@ -2058,6 +2060,7 @@
20582060 int h = fib_multipath_hash(res->fi->fib_net, NULL, skb, hkeys);
20592061
20602062 fib_select_multipath(res, h);
2063
+ IPCB(skb)->flags |= IPSKB_MULTIPATH;
20612064 }
20622065 #endif
20632066