--- x/net/ipv4/inet_connection_sock.c +++ y/net/ipv4/inet_connection_sock.c @@ -589,7 +589,7 @@ int inet_csk_get_port(struct sock *sk, u success: inet_csk_update_fastreuse(tb, sk); - if (!inet_csk(sk)->icsk_bind_hash) + if (tb != inet_csk(sk)->icsk_bind_hash) inet_bind_hash(sk, tb, tb2, port); WARN_ON(inet_csk(sk)->icsk_bind_hash != tb); WARN_ON(inet_csk(sk)->icsk_bind2_hash != tb2);