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 Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux