aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 933b093721ea..78c4ce424a68 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1768,7 +1768,7 @@ static inline int __mkroute_input(struct sk_buff *skb,
1768 if (err) 1768 if (err)
1769 flags |= RTCF_DIRECTSRC; 1769 flags |= RTCF_DIRECTSRC;
1770 1770
1771 if (out_dev == in_dev && err && !(flags & (RTCF_NAT | RTCF_MASQ)) && 1771 if (out_dev == in_dev && err && !(flags & RTCF_MASQ) &&
1772 (IN_DEV_SHARED_MEDIA(out_dev) || 1772 (IN_DEV_SHARED_MEDIA(out_dev) ||
1773 inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res)))) 1773 inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res))))
1774 flags |= RTCF_DOREDIRECT; 1774 flags |= RTCF_DOREDIRECT;
@@ -1777,7 +1777,7 @@ static inline int __mkroute_input(struct sk_buff *skb,
1777 /* Not IP (i.e. ARP). Do not create route, if it is 1777 /* Not IP (i.e. ARP). Do not create route, if it is
1778 * invalid for proxy arp. DNAT routes are always valid. 1778 * invalid for proxy arp. DNAT routes are always valid.
1779 */ 1779 */
1780 if (out_dev == in_dev && !(flags & RTCF_DNAT)) { 1780 if (out_dev == in_dev) {
1781 err = -EINVAL; 1781 err = -EINVAL;
1782 goto cleanup; 1782 goto cleanup;
1783 } 1783 }