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 11d1b2080a16..fb47c8f0cd86 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1816,15 +1816,15 @@ static unsigned int ipv4_default_advmss(const struct dst_entry *dst)
1816 1816
1817static unsigned int ipv4_mtu(const struct dst_entry *dst) 1817static unsigned int ipv4_mtu(const struct dst_entry *dst)
1818{ 1818{
1819 const struct rtable *rt = (const struct rtable *) dst;
1819 unsigned int mtu = dst_metric_raw(dst, RTAX_MTU); 1820 unsigned int mtu = dst_metric_raw(dst, RTAX_MTU);
1820 1821
1821 if (mtu) 1822 if (mtu && rt_is_output_route(rt))
1822 return mtu; 1823 return mtu;
1823 1824
1824 mtu = dst->dev->mtu; 1825 mtu = dst->dev->mtu;
1825 1826
1826 if (unlikely(dst_metric_locked(dst, RTAX_MTU))) { 1827 if (unlikely(dst_metric_locked(dst, RTAX_MTU))) {
1827 const struct rtable *rt = (const struct rtable *) dst;
1828 1828
1829 if (rt->rt_gateway != rt->rt_dst && mtu > 576) 1829 if (rt->rt_gateway != rt->rt_dst && mtu > 576)
1830 mtu = 576; 1830 mtu = 576;