/* This routine does path mtu discovery as defined in RFC1191.  */
static void do_pmtu_discovery(struct sock *sk, struct iphdr *iph, u32 mtu)
/* This routine does path mtu discovery as defined in RFC1191.  */
static void do_pmtu_discovery(struct sock *sk, struct iphdr *iph, u32 mtu)
{
	struct dst_entry *dst;
	struct inet_sock *inet = inet_sk(sk);
	if (sk->sk_state == TCP_LISTEN)
		return;
	if ((dst = __sk_dst_check(sk, 0)) == NULL)
		return;
	dst->ops->update_pmtu(dst, mtu);
	if (mtu < dst_mtu(dst) && ip_dont_fragment(sk, dst))
		sk->sk_err_soft = EMSGSIZE;
	mtu = dst_mtu(dst);
	if (inet->pmtudisc != IP_PMTUDISC_DONT &&
	    inet_csk(sk)->icsk_pmtu_cookie > mtu) {
		tcp_sync_mss(sk, mtu);
		tcp_simple_retransmit(sk);
	}
}