diff options
author | Josef Bacik <jbacik@fb.com> | 2017-01-17 07:51:06 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-18 13:04:29 -0500 |
commit | 637bc8bbe6c0a288a596edfdcdd5657c72a848db (patch) | |
tree | 32d780078fd8ec3257216e568cf06a0bac5ca581 /kernel/cred.c | |
parent | 289141b7688b71dc69b8d7a54bf67a4d7bc79f96 (diff) | |
download | linux-637bc8bbe6c0a288a596edfdcdd5657c72a848db.tar.bz2 |
inet: reset tb->fastreuseport when adding a reuseport sk
If we have non reuseport sockets on a tb we will set tb->fastreuseport to 0 and
never set it again. Which means that in the future if we end up adding a bunch
of reuseport sk's to that tb we'll have to do the expensive scan every time.
Instead add the ipv4/ipv6 saddr fields to the bind bucket, as well as the family
so we know what comparison to make, and the ipv6 only setting so we can make
sure to compare with new sockets appropriately. Once one sk has made it onto
the list we know that there are no potential bind conflicts on the owners list
that match that sk's rcv_addr. So copy the sk's information into our bind
bucket and set tb->fastruseport to FASTREUSESOCK_STRICT so we know we have to do
an extra check for subsequent reuseport sockets and skip the expensive bind
conflict check.
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/cred.c')
0 files changed, 0 insertions, 0 deletions