aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2011-11-22 21:13:31 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-26 14:29:51 -0500
commit618f9bc74a039da76fa027ac2600c5b785b964c5 (patch)
treeff69bc14b711c9c9d4c691d2a8c262401d62c8c9 /net/ipv6/route.c
parentebb762f27fed083cb993a0816393aba4615f6544 (diff)
net: Move mtu handling down to the protocol depended handlers
We move all mtu handling from dst_mtu() down to the protocol layer. So each protocol can implement the mtu handling in a different manner. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 76645d7077ff..3399dd326287 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -157,7 +157,9 @@ static struct dst_ops ip6_dst_ops_template = {
157 157
158static unsigned int ip6_blackhole_mtu(const struct dst_entry *dst) 158static unsigned int ip6_blackhole_mtu(const struct dst_entry *dst)
159{ 159{
160 return dst->dev->mtu; 160 unsigned int mtu = dst_metric_raw(dst, RTAX_MTU);
161
162 return mtu ? : dst->dev->mtu;
161} 163}
162 164
163static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) 165static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu)
@@ -1043,8 +1045,13 @@ static unsigned int ip6_default_advmss(const struct dst_entry *dst)
1043 1045
1044static unsigned int ip6_mtu(const struct dst_entry *dst) 1046static unsigned int ip6_mtu(const struct dst_entry *dst)
1045{ 1047{
1046 unsigned int mtu = IPV6_MIN_MTU;
1047 struct inet6_dev *idev; 1048 struct inet6_dev *idev;
1049 unsigned int mtu = dst_metric_raw(dst, RTAX_MTU);
1050
1051 if (mtu)
1052 return mtu;
1053
1054 mtu = IPV6_MIN_MTU;
1048 1055
1049 rcu_read_lock(); 1056 rcu_read_lock();
1050 idev = __in6_dev_get(dst->dev); 1057 idev = __in6_dev_get(dst->dev);