summaryrefslogtreecommitdiffstats
path: root/net/decnet/dn_route.c
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2011-11-23 03:13:31 +0100
committerDavid S. Miller <davem@davemloft.net>2011-11-26 20:29:51 +0100
commit618f9bc74a039da76fa027ac2600c5b785b964c5 (patch)
treeff69bc14b711c9c9d4c691d2a8c262401d62c8c9 /net/decnet/dn_route.c
parentnet: Rename the dst_opt default_mtu method to mtu (diff)
downloadlinux-618f9bc74a039da76fa027ac2600c5b785b964c5.tar.xz
linux-618f9bc74a039da76fa027ac2600c5b785b964c5.zip
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/decnet/dn_route.c')
-rw-r--r--net/decnet/dn_route.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index db4867963247..94f4ec036669 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -827,7 +827,9 @@ static unsigned int dn_dst_default_advmss(const struct dst_entry *dst)
static unsigned int dn_dst_mtu(const struct dst_entry *dst)
{
- return dst->dev->mtu;
+ unsigned int mtu = dst_metric_raw(dst, RTAX_MTU);
+
+ return mtu ? : dst->dev->mtu;
}
static struct neighbour *dn_dst_neigh_lookup(const struct dst_entry *dst, const void *daddr)