summaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index fbcd9be3a470..cf755156a684 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -423,12 +423,13 @@ static struct sock *udp4_lib_lookup2(struct net *net,
423 score = compute_score(sk, net, saddr, sport, 423 score = compute_score(sk, net, saddr, sport,
424 daddr, hnum, dif, sdif); 424 daddr, hnum, dif, sdif);
425 if (score > badness) { 425 if (score > badness) {
426 if (sk->sk_reuseport) { 426 if (sk->sk_reuseport &&
427 sk->sk_state != TCP_ESTABLISHED) {
427 hash = udp_ehashfn(net, daddr, hnum, 428 hash = udp_ehashfn(net, daddr, hnum,
428 saddr, sport); 429 saddr, sport);
429 result = reuseport_select_sock(sk, hash, skb, 430 result = reuseport_select_sock(sk, hash, skb,
430 sizeof(struct udphdr)); 431 sizeof(struct udphdr));
431 if (result) 432 if (result && !reuseport_has_conns(sk, false))
432 return result; 433 return result;
433 } 434 }
434 badness = score; 435 badness = score;