提交 59445b6b 编写于 作者: G Gao feng 提交者: David S. Miller

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: NGao feng <gaofeng@cn.fujitsu.com>
Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1805b2f0
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册