Unverified Commit 5906512f authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents 36a8abcd 5eaa9b7d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1212,6 +1212,7 @@ static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie)

static void ipv4_send_dest_unreach(struct sk_buff *skb)
{
	struct net_device *dev;
	struct ip_options opt;
	int res;

@@ -1229,7 +1230,8 @@ static void ipv4_send_dest_unreach(struct sk_buff *skb)
		opt.optlen = ip_hdr(skb)->ihl * 4 - sizeof(struct iphdr);

		rcu_read_lock();
		res = __ip_options_compile(dev_net(skb->dev), &opt, skb, NULL);
		dev = skb->dev ? skb->dev : skb_rtable(skb)->dst.dev;
		res = __ip_options_compile(dev_net(dev), &opt, skb, NULL);
		rcu_read_unlock();

		if (res)