mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-16 21:34:10 +00:00
in_pcb: fix TCP local ephemeral port accounting
Fix logic error causing UDP(-Lite) local ephemeral port bindings to count against the TCP allocation counter, potentially causing TCP to go from random to sequential port allocation mode prematurely.
This commit is contained in:
parent
5577aa338a
commit
13e3f3349f
|
@ -748,7 +748,7 @@ in_pcb_lport_dest(struct inpcb *inp, struct sockaddr *lsa, u_short *lportp,
|
|||
if (first == last)
|
||||
dorandom = 0;
|
||||
/* Make sure to not include UDP(-Lite) packets in the count. */
|
||||
if (pcbinfo != &V_udbinfo || pcbinfo != &V_ulitecbinfo)
|
||||
if (pcbinfo != &V_udbinfo && pcbinfo != &V_ulitecbinfo)
|
||||
V_ipport_tcpallocs++;
|
||||
/*
|
||||
* Instead of having two loops further down counting up or down
|
||||
|
|
Loading…
Reference in a new issue