]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tcp: avoid call to soisconnected() on transition to ESTABLISHED
authorGleb Smirnoff <glebius@FreeBSD.org>
Thu, 8 Sep 2022 16:16:04 +0000 (09:16 -0700)
committerGleb Smirnoff <glebius@FreeBSD.org>
Thu, 8 Sep 2022 16:16:04 +0000 (09:16 -0700)
commite80062a2d43376a3b89ca68ab6c6f63b8e032e1d
tree2215c81f2c6c3b0d7214a1bcd9b86a1c7e6e75bb
parent72291cee075d9ef1a608b2a67762b44e024cc0d4
tcp: avoid call to soisconnected() on transition to ESTABLISHED

This call existed since pre-FreeBSD times, and it is hard to understand
why it was there in the first place.  After 6f3caa6d815 it definitely
became necessary always and commit message from f1ee30ccd60 confirms that.
Now that 6f3caa6d815 is effectively backed out by 07285bb4c22, the call
appears to be useful only for sockets that landed on the incomplete queue,
e.g. sockets that have accept_filter(9) enabled on them.

Provide a new TCP flag to mark connections that are known to be on the
incomplete queue, and call soisconnected() only for those connections.

Reviewed by: rrs, tuexen
Differential revision: https://reviews.freebsd.org/D36488
sys/kern/uipc_socket.c
sys/netinet/tcp_input.c
sys/netinet/tcp_syncache.c
sys/netinet/tcp_usrreq.c
sys/netinet/tcp_var.h
sys/sys/socketvar.h