Re: [PATCH bpf-next v6 4/8] net: remove duplicate reuseport_lookup functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/20/23 8:30 AM, Lorenz Bauer wrote:
@@ -452,7 +436,14 @@ static struct sock *udp4_lib_lookup2(struct net *net,
  				      daddr, hnum, dif, sdif);
  		if (score > badness) {
  			badness = score;
-			result = lookup_reuseport(net, sk, skb, saddr, sport, daddr, hnum);
+
+			if (sk->sk_state == TCP_ESTABLISHED) {
+				result = sk;
+				continue;
+			}

Thanks for the cleanup. I also found moving the TCP_ESTABLISHED check here made the score logic easier to reason.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux