summaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorGao feng <gaofeng@cn.fujitsu.com>2011-10-19 17:34:09 +0200
committerDavid S. Miller <davem@davemloft.net>2011-10-25 00:30:07 +0200
commit59445b6b1f90b97c4e28062b96306bacfa4fb170 (patch)
tree61408e20f1e56c98a5b377ae02079dc5c229af00 /net/ipv4/route.c
parentMerge branch 'master' of ra.kernel.org:/pub/scm/linux/kernel/git/davem/net (diff)
downloadlinux-59445b6b1f90b97c4e28062b96306bacfa4fb170.tar.xz
linux-59445b6b1f90b97c4e28062b96306bacfa4fb170.zip
ipv4: avoid useless call of the function check_peer_pmtu
In func ipv4_dst_check,check_peer_pmtu should be called only when peer is updated. So,if the peer is not updated in ip_rt_frag_needed,we can not inc __rt_peer_genid. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ipv4/route.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 1082460daca7..155138d8ec8b 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1593,11 +1593,10 @@ unsigned short ip_rt_frag_needed(struct net *net, const struct iphdr *iph,
est_mtu = mtu;
peer->pmtu_learned = mtu;
peer->pmtu_expires = pmtu_expires;
+ atomic_inc(&__rt_peer_genid);
}
inet_putpeer(peer);
-
- atomic_inc(&__rt_peer_genid);
}
return est_mtu ? : new_mtu;
}