summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Arlott2007-07-26 09:09:55 +0200
committerDavid S. Miller2007-07-31 11:28:04 +0200
commit566cfd8f0e049a0647f94714f913e2a975dc464f (patch)
tree955049995c9cc06dc2db3b11a73454c09cf8eb18
parent[NET_DMA]: remove unused dma_memcpy_to_kernel_iovec (diff)
downloadkernel-qcow2-linux-566cfd8f0e049a0647f94714f913e2a975dc464f.tar.gz
kernel-qcow2-linux-566cfd8f0e049a0647f94714f913e2a975dc464f.tar.xz
kernel-qcow2-linux-566cfd8f0e049a0647f94714f913e2a975dc464f.zip
[IPV6]: Don't update ADVMSS on routes where the MTU is not also updated
The ADVMSS value was incorrectly updated for ALL routes when the MTU is updated because it's outside the effect of the if statement's condition. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv6/route.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 919de682b331..55ea80fac601 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1983,9 +1983,10 @@ static int rt6_mtu_change_route(struct rt6_info *rt, void *p_arg)
!dst_metric_locked(&rt->u.dst, RTAX_MTU) &&
(dst_mtu(&rt->u.dst) > arg->mtu ||
(dst_mtu(&rt->u.dst) < arg->mtu &&
- dst_mtu(&rt->u.dst) == idev->cnf.mtu6)))
+ dst_mtu(&rt->u.dst) == idev->cnf.mtu6))) {
rt->u.dst.metrics[RTAX_MTU-1] = arg->mtu;
- rt->u.dst.metrics[RTAX_ADVMSS-1] = ipv6_advmss(arg->mtu);
+ rt->u.dst.metrics[RTAX_ADVMSS-1] = ipv6_advmss(arg->mtu);
+ }
return 0;
}