diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2011-11-22 21:14:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-26 14:29:52 -0500 |
commit | 261663b0ee2ee8e3947f4c11c1a08be18cd2cea1 (patch) | |
tree | 12cf5a46c7c5ec2f615826b975fa85473e054bd7 /net/ipv4/route.c | |
parent | b8400f3718a11c9b0ca400705cddf94f3132c1c3 (diff) |
ipv4: Don't use the cached pmtu informations for input routes
The pmtu informations on the inetpeer are visible for output and
input routes. On packet forwarding, we might propagate a learned
pmtu to the sender. As we update the pmtu informations of the
inetpeer on demand, the original sender of the forwarded packets
might never notice when the pmtu to that inetpeer increases.
So use the mtu of the outgoing device on packet forwarding instead
of the pmtu to the final destination.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 4 |
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 | ||
1817 | static unsigned int ipv4_mtu(const struct dst_entry *dst) | 1817 | static 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; |