Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / ip_forward.c
index 99461f09320f6d7350ac2a91e5c49062617f2c15..3b34d1c862709e7bde3cd3665fad1e191692506d 100644 (file)
@@ -84,7 +84,7 @@ int ip_forward(struct sk_buff *skb)
 
        rt = skb_rtable(skb);
 
-       if (opt->is_strictroute && rt->rt_dst != rt->rt_gateway)
+       if (opt->is_strictroute && ip_hdr(skb)->daddr != rt->rt_gateway)
                goto sr_failed;
 
        if (unlikely(skb->len > dst_mtu(&rt->dst) && !skb_is_gso(skb) &&