Merge branch 'tipc-Mar13-2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/net-next-2.6
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index 6442c35..86b1d08 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -511,6 +511,7 @@
p->rate_tokens = 0;
p->rate_last = 0;
p->pmtu_expires = 0;
+ p->pmtu_orig = 0;
memset(&p->redirect_learned, 0, sizeof(p->redirect_learned));
INIT_LIST_HEAD(&p->unused);
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 5655095..209989c 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1533,9 +1533,15 @@
if (mtu < ip_rt_min_pmtu)
mtu = ip_rt_min_pmtu;
if (!peer->pmtu_expires || mtu < peer->pmtu_learned) {
+ unsigned long pmtu_expires;
+
+ pmtu_expires = jiffies + ip_rt_mtu_expires;
+ if (!pmtu_expires)
+ pmtu_expires = 1UL;
+
est_mtu = mtu;
peer->pmtu_learned = mtu;
- peer->pmtu_expires = jiffies + ip_rt_mtu_expires;
+ peer->pmtu_expires = pmtu_expires;
}
inet_putpeer(peer);
@@ -1549,7 +1555,7 @@
{
unsigned long expires = peer->pmtu_expires;
- if (time_before(expires, jiffies)) {
+ if (time_before(jiffies, expires)) {
u32 orig_dst_mtu = dst_mtu(dst);
if (peer->pmtu_learned < orig_dst_mtu) {
if (!peer->pmtu_orig)
@@ -1574,14 +1580,20 @@
if (mtu < ip_rt_min_pmtu)
mtu = ip_rt_min_pmtu;
if (!peer->pmtu_expires || mtu < peer->pmtu_learned) {
+ unsigned long pmtu_expires;
+
+ pmtu_expires = jiffies + ip_rt_mtu_expires;
+ if (!pmtu_expires)
+ pmtu_expires = 1UL;
+
peer->pmtu_learned = mtu;
- peer->pmtu_expires = jiffies + ip_rt_mtu_expires;
+ peer->pmtu_expires = pmtu_expires;
atomic_inc(&__rt_peer_genid);
rt->rt_peer_genid = rt_peer_genid();
-
- check_peer_pmtu(dst, peer);
}
+ check_peer_pmtu(dst, peer);
+
inet_putpeer(peer);
}
}