dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Gao feng 2011-10-19 15:34:09 +00:00 committed by David S. Miller
parent 1805b2f048
commit 59445b6b1f
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}