/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#include <sys/xti_inet.h>
#include <sys/squeue_impl.h>
#include <inet/tcp_impl.h>
#include <inet/proto_set.h>
void
{
#ifdef _ILP32
#else
#endif
/*
* Insert this socket into the acceptor hash.
* We might need it for T_CONN_RES message
*/
}
/* Shorthand to generate and send TPI error acks to our client */
void
{
}
/* Shorthand to generate and send TPI error acks to our client */
void
{
}
}
/*
* TCP routine to get the values of options.
*/
int
{
}
/* ARGSUSED */
int
{
}
static int
int *t_errorp, int *sys_errorp)
{
int error;
int is_absreq_failure;
int prim_type;
/*
* All Solaris components should pass a db_credp
* for this TPI message, hence we ASSERT.
* But in case there is some other M_PROTO that looks
* like a TPI message sent by some other kernel
* component, we check and return an error.
*/
return (-1);
prim_type == T_CONN_RES);
switch (prim_type) {
case T_CONN_REQ:
break;
case O_T_CONN_RES:
case T_CONN_RES:
break;
}
*t_errorp = 0;
*sys_errorp = 0;
*do_disconnectp = 0;
switch (error) {
case 0: /* no error */
ASSERT(is_absreq_failure == 0);
return (0);
case ENOPROTOOPT:
break;
case EACCES:
break;
default:
break;
}
if (is_absreq_failure != 0) {
/*
* The connection request should get the local ack
* T_OK_ACK and then a T_DISCON_IND.
*/
*do_disconnectp = 1;
}
return (-1);
}
void
{
int error;
int backlog;
/*
* All Solaris components should pass a db_credp
* for this TPI message, hence we ASSERT.
* But in case there is some other M_PROTO that looks
* like a TPI message sent by some other kernel
* component, we check and return an error.
*/
return;
}
if (connp->conn_debug) {
"tcp_tpi_bind: bad req, len %u",
}
return;
}
/* Make sure the largest address fits */
return;
}
switch (len) {
case 0: /* request for a generic port */
} else {
}
break;
case sizeof (sin_t): /* Complete IPv4 address */
sizeof (sin_t));
break;
case sizeof (sin6_t): /* Complete IPv6 address */
break;
default:
if (connp->conn_debug) {
"tcp_tpi_bind: bad address length, %d",
tbr->ADDR_length);
}
return;
}
if (backlog > 0) {
} else {
}
done:
if (error > 0) {
} else if (error < 0) {
} else {
/*
*/
} else {
}
}
}
/* tcp_unbind is called by tcp_wput_proto to handle T_UNBIND_REQ messages. */
void
{
int error;
if (error > 0) {
} else if (error < 0) {
} else {
/* Send M_FLUSH according to TPI */
}
}
int
{
if (flags & SO_FALLBACK) {
/*
* stream is being closed while in fallback
* simply free the resources that were allocated
*/
qprocsoff(q);
goto done;
}
/*
*/
qprocsoff(q);
/*
* Drop IP's reference on the conn. This is the last reference
* on the connp if the state was less than established. If the
* connection has gone into timewait state, then we will have
* one ref for the TCP and one more ref (total of two) for the
* classifier connected hash list (a timewait connections stays
* in connected hash till closed).
*
* We can't assert the references because there might be other
* transient reference places because of some walkers or queued
* packets in squeue for the timewait state.
*/
done:
return (0);
}
int
{
extern struct qinit tcp_acceptor_winit;
/*
* We had opened an acceptor STREAM for sockfs which is
* now being closed due to some error.
*/
qprocsoff(q);
return (0);
}
/*
* Put a connection confirmation message upstream built from the
* failure.
*/
{
int optlen = 0;
/*
* Return in T_CONN_CON results of option negotiation through
* the T_CONN_REQ. Note: If there is an real end-to-end option
* negotiation, then what is received from remote end needs
* to be taken into account but there is no such thing (yet?)
* Note: We do not use mi_offset_param() here as
* tcp_opts_conn_req contents do not directly come from
* an application and are either generated in kernel or
* from user input that was already verified.
*/
optlen = (int)
}
/* packet is IPv4 */
} else {
}
} else {
}
if (!mp)
return (B_FALSE);
if (IPCL_IS_NONSTR(connp)) {
} else {
/* So that getpeerucred works for TPI sockfs */
}
}
} else {
}
return (B_TRUE);
}
/*
* Successful connect request processing begins when our client passes
* a T_CONN_REQ message into tcp_wput(), which performs function calls into
* IP and the passes a T_OK_ACK (or T_ERROR_ACK upstream).
*
* After various error checks are completed, tcp_tpi_connect() lays
* the target address and port into the composite header template.
* Then we ask IP for information, including a source address if we didn't
* already have one. Finally we prepare to send the SYN packet, and then
* send up the T_OK_ACK reply message.
*/
void
{
int error;
/*
* All Solaris components should pass a db_credp
* for this TPI message, hence we ASSERT.
* But in case there is some other M_PROTO that looks
* like a TPI message sent by some other kernel
* component, we check and return an error.
*/
return;
}
return;
}
/*
* Pre-allocate the T_ordrel_ind mblk so that at close time, we
* will always have that to send up. Otherwise, we need to do
* special handling in case the allocation fails at that time.
* If the end point is TPI, the tcp_t can be reused and the
* tcp_ordrel_mp may be allocated already.
*/
return;
}
}
/*
* Determine packet type based on type of address passed in
* the request should contain an IPv4 or IPv6 address.
* Make sure that address family matches the type of
* family of the address passed down.
*/
switch (tcr->DEST_length) {
default:
return;
/*
* XXX: The check for valid DEST_length was not there
* in earlier releases and some buggy
* TLI apps (e.g Sybase) got away with not feeding
* in sin_zero part of address.
* We allow that bug to keep those buggy apps humming.
* Test suites require the check on DEST_length.
* We construct a new mblk with valid DEST_length
* free the original so the rest of the code does
* not have to keep track of this special shorter
* length address case.
*/
return;
}
/* Get pointer to shorter address to copy from original mp */
return;
}
/* Note:nsin->sin_zero zero-fill with sin_null assign above */
if (tcr->OPT_length != 0) {
tcr->OPT_length);
}
}
/* FALLTHRU */
case sizeof (sin_t):
sizeof (sin_t));
break;
case sizeof (sin6_t):
sizeof (sin6_t));
break;
}
if (error != 0) {
return;
}
/*
* should key on their sequence number and cut them loose.
*/
/*
* If options passed in, feed it for verification and handling
*/
if (tcr->OPT_length != 0) {
conn_opts_mp = NULL;
if (do_disconnect) {
ECONNREFUSED, 0);
if (!discon_mp) {
return;
}
if (!ok_mp) {
return;
}
} else {
}
return;
}
/*
* Success in setting options, the mp option buffer represented
* by OPT_length/offset has been potentially modified and
* contains results of option processing. We copy it in
* another mp to save it for potentially influencing returning
* it in T_CONN_CONN.
*/
if (!conn_opts_mp) {
return;
}
/*
* Note:
* These resulting option negotiation can include any
* end-to-end negotiation options but there no such
*/
}
}
/* call the non-TPI version */
if (error < 0) {
} else if (error > 0) {
} else {
}
/*
* Note: Code below is the "failure" case
*/
/* return error ack and blow away saved option results if any */
else {
}
}
static int
{
case TCPS_IDLE:
return (TS_UNBND);
case TCPS_LISTEN:
/*
* Return whether there are outstanding T_CONN_IND waiting
* for the matching T_CONN_RES. Therefore don't count q0.
*/
if (tcp->tcp_conn_req_cnt_q > 0)
return (TS_WRES_CIND);
else
return (TS_IDLE);
case TCPS_BOUND:
return (TS_IDLE);
case TCPS_SYN_SENT:
return (TS_WCON_CREQ);
case TCPS_SYN_RCVD:
/*
* Note: assumption: this has to the active open SYN_RCVD.
* The passive instance is detached in SYN_RCVD stage of
* incoming connection processing so we cannot get request
* for T_info_ack on it.
*/
return (TS_WACK_CRES);
case TCPS_ESTABLISHED:
return (TS_DATA_XFER);
case TCPS_CLOSE_WAIT:
return (TS_WREQ_ORDREL);
case TCPS_FIN_WAIT_1:
return (TS_WIND_ORDREL);
case TCPS_FIN_WAIT_2:
return (TS_WIND_ORDREL);
case TCPS_CLOSING:
case TCPS_LAST_ACK:
case TCPS_TIME_WAIT:
case TCPS_CLOSED:
/*
* Following TS_WACK_DREQ7 is a rendition of "not
* yet TS_IDLE" TPI state. There is no best match to any
* TPI state for TCPS_{CLOSING, LAST_ACK, TIME_WAIT} but we
* state of TSTATECHNG (state is process of changing) which
* captures what this dummy state represents.
*/
return (TS_WACK_DREQ7);
default:
return (TS_UNBND);
}
}
static void
{
extern struct T_info_ack tcp_g_t_info_ack;
extern struct T_info_ack tcp_g_t_info_ack_v6;
else
*tia = tcp_g_t_info_ack;
/* Not yet set - tcp_open does not set mss */
else
} else {
}
/* TODO: Default ETSDU is 1. Is that correct for tcp? */
}
void
{
}
if (cap_bits1 & TC1_ACCEPTOR_ID) {
}
}
/*
* This routine responds to T_CAPABILITY_REQ messages. It is called by
* tcp_wput. Much of the T_CAPABILITY_ACK information is copied from
* tcp_g_t_info_ack. The current state of the stream is copied from
* tcp_state.
*/
void
{
return;
}
return;
}
/*
* This routine responds to T_INFO_REQ messages. It is called by tcp_wput.
* Most of the T_INFO_ACK information is copied from tcp_g_t_info_ack.
* The current state of the stream is copied from tcp_state.
*/
void
{
if (!mp) {
return;
}
}
/* Respond to the TPI addr request */
void
{
/* Make it large enough for worst case */
return;
}
else
/*
* Note: Following code assumes 32 bit alignment of basic
* data structures like sin_t and struct T_addr_ack.
*/
/*
* Fill in local address first
*/
}
/*
* Fill in Remote address
*/
/* assumed 32-bit alignment */
}
}
/*
* The sockfs accept is done on the acceptor stream and control goes
* through tcp_tli_accept() and tcp_accept()/tcp_accept_swap() is not
* called. In either case, both the eager and listener are in their own
* perimeter (squeue) and the code has to deal with potential race.
*
* See the block comment on top of tcp_accept() and tcp_tli_accept().
*/
static void
{
/*
* Trusted Extensions may need to use a security label that is
* different from the acceptor's label on MLP and MAC-Exempt
* sockets. If this is the case, the required security label
* already exists in econnp->conn_ixa->ixa_tsl. Since we make the
* acceptor stream refer to econnp we atomatically get that label.
*/
/*
* the acceptor id.
*/
/* remove eager from listen list... */
/*
* which might be a different squeue from our peer TCP instance.
* For TCP Fusion, the peer expects that whenever tcp_detached is
* clear, our TCP queues point to the acceptor's queues. Thus, use
* above reach global visibility prior to the clearing of tcp_detached.
*/
/* Do the IPC initialization */
/* Done with old IPC. Drop its ref on its connp */
}
/*
* This runs at the tail end of accept processing on the squeue of the
* new connection.
*/
/* ARGSUSED */
static void
{
/* Should never be called for non-STREAMS sockets */
/* We should just receive a single mblk that fits a T_discon_ind */
/*
* Drop the eager's ref on the listener, that was placed when
* this eager began life in tcp_input_listener.
*/
/*
* Someone blewoff the eager before we could finish
* the accept.
*
* The only reason eager exists it because we put in
* a ref on it when conn ind went up. We need to send
* a disconnect indication up while the last reference
* on the eager will be dropped by the squeue when we
* return.
*/
/*
* Let us reuse the incoming mblk to avoid
* memory allocation failure problems. We know
* that the size of the incoming mblk i.e.
* stroptions is greater than sizeof
* T_discon_ind.
*/
sizeof (struct T_discon_ind));
if (tcp->tcp_issocket) {
tdi->SEQ_number = 0;
} else {
tdi->SEQ_number =
}
sizeof (struct T_discon_ind);
}
return;
}
/*
* This is the first time we run on the correct
* queue after tcp_accept. So fix all the q parameters
* here.
*
* Let us reuse the incoming mblk to avoid
* memory allocation failure problems. We know
* that the size of the incoming mblk is at least
* stroptions
*/
/* Send the options up */
/*
*
* Adjust receive window in case it had decreased
* (because there is data <=> tcp_rcv_list != NULL)
* while the connection was detached. Note that
* in case the eager was flow-controlled, w/o this
* code, the rwnd may never open up again!
*/
/* We drain directly in case of fused tcp loopback */
}
}
(void) tcp_rcv_drain(tcp);
/*
* For fused tcp loopback, back-enable peer endpoint
* if it's currently flow-controlled.
*/
if (peer_tcp->tcp_flow_stopped) {
}
}
}
}
if (connp->conn_keepalive) {
tcp->tcp_ka_last_intrvl = 0;
}
/*
* At this point, eager is fully established and will
* have the following references -
*
* 2 references for connection to exist (1 for TCP and 1 for IP).
* 1 reference for the squeue which will be dropped by the squeue as
* soon as this function returns.
* There will be 1 additonal reference for being in classifier
* hash list provided something bad hasn't happened.
*/
}
/*
* Pull a deferred connection indication off of the listener. The caller
* must verify that there is a deferred conn ind under eager_lock before
* calling this function.
*/
static mblk_t *
{
/*
* listener->tcp_eager_prev_q0 points to the TAIL of the
* deferred T_conn_ind queue. We need to get to the head
* of the queue in order to send up T_conn_ind the same
* order as how the 3WHS is completed.
*/
break;
else
}
/* Move from q0 to q */
/* Make sure the tcp isn't in the list of droppables */
/*
* Insert at end of the queue because sockfs sends
* down T_CONN_RES in chronological order. Leaving
* the older conn indications at front of the queue
* helps reducing search time.
*/
} else {
}
return (conn_ind);
}
/*
* Reply to a clients T_CONN_RES TPI message. This function
* on the acceptor STREAM and processed in tcp_accept_common().
* Read the block comment on top of tcp_input_listener().
*/
void
{
return;
}
/*
* Under ILP32 the stream head points tcr->ACCEPTOR_id at the
* read side queue of the streams device underneath us i.e. the
* read side queue of 'ip'. Since we can't deference QUEUE_ptr we
* look it up in the queue_hash. Under LP64 it sends down the
* minor_t of the accepting endpoint.
*
* fanout hash lock is held.
* This prevents any thread from entering the acceptor queue from
* below (since it has not been hard bound yet i.e. any inbound
* packets will arrive on the listener conn_t and
* go through the classifier).
* The CONN_INC_REF will prevent the acceptor from closing.
*
* XXX It is still possible for a tli application to send down data
* on the accepting stream while another thread calls t_accept.
* This should not be a problem for well-behaved applications since
* the T_OK_ACK is sent after the queue swapping is completed.
*
* If the accepting fd is the same as the listening fd, avoid
* queue hash lookup since that will return an eager listener in a
* already established state.
*/
/* only count how many T_CONN_INDs so don't count q0 */
return;
}
if (listener->tcp_conn_req_cnt_q0 != 0) {
/* Throw away all the eagers on q0. */
}
if (listener->tcp_syn_defense) {
IP_ADDR_CACHE_SIZE * sizeof (ipaddr_t));
}
}
/*
* Transfer tcp_conn_req_max to the eager so that when
* a disconnect occurs we can revert the endpoint to the
* listen state.
*/
/*
* Get a reference on the acceptor just like the
* tcp_acceptor_hash_lookup below.
*/
} else {
"tcp_accept: did not find acceptor 0x%x\n",
}
return;
}
/*
* Verify acceptor state. The acceptable states for an acceptor
* include TCPS_IDLE and TCPS_BOUND.
*/
case TCPS_IDLE:
/* FALLTHRU */
case TCPS_BOUND:
break;
default:
return;
}
}
/* The listener must be in TCPS_LISTEN */
return;
}
/*
* Rendezvous with an eager connection request packet hanging off
* 'tcp' that has the 'seqnum' tag. We tagged the detached open
* tcp structure when the connection packet arrived in
* tcp_input_listener().
*/
do {
return;
}
/*
* At this point, both acceptor and listener have 2 ref
* that they begin with. Acceptor has one additional ref
* we placed in lookup while listener has 3 additional
* ref for being behind the squeue (tcp_accept() is
* done on listener's squeue); being in classifier hash;
* and eager's ref on listener.
*/
/*
* The eager at this point is set in its own squeue and
* could easily have been killed (tcp_accept_finish will
* deal with that) because of a TH_RST so we can only
* ASSERT for a single ref.
*/
/*
* Pre allocate the discon_ind mblk also. tcp_accept_finish will
* use it if something failed.
*/
sizeof (struct stroptions)), BPRI_HI);
return;
}
/* Hold a copy of mp, in case reallocb fails */
return;
}
/*
* This is an expanded version of mi_tpi_ok_ack_alloc()
* which allocates a larger mblk and appends the new
* local address to the ok_ack. The address is copied by
* soaccept() for getsockname().
*/
{
int extra;
/*
* Try to re-use mp, if possible. Otherwise, allocate
* an mblk and return it as ok_mp. In any case, mp
* is no longer usable upon return.
*/
/* Original mp has been freed by now, so use mp1 */
return;
}
switch (extra) {
case sizeof (sin_t): {
break;
}
case sizeof (sin6_t): {
} else {
sin6->sin6_scope_id = 0;
}
sin6->__sin6_src_id = 0;
break;
}
default:
break;
}
}
/*
* If there are no options we know that the T_CONN_RES will
* succeed. However, we can't send the T_OK_ACK upstream until
* the tcp_accept_swap is done since it would be dangerous to
* let the application start using the new fd prior to the swap.
*/
/*
* tcp_accept_swap unlinks eager from listener but does not drop
* the eager's reference on the listener.
*/
/*
* The eager is now associated with its own queue. Insert in
* the hash so that the connection can be reused for a future
* T_CONN_RES.
*/
/*
* We now do the processing of options with T_CONN_RES.
* We delay till now since we wanted to have queue to pass to
* option processing routines that points back to the right
* instance structure which does not happen until after
* tcp_accept_swap().
*
* Note:
* The sanity of the logic here assumes that whatever options
* are appropriate to inherit from listner=>eager are done
* before this point, and whatever were to be overridden (or not)
* in transfer logic from eager=>acceptor in tcp_accept_swap().
* [ Warning: acceptor endpoint can have T_OPTMGMT_REQ done to it
* before its ACCEPTOR_id comes down in T_CONN_RES ]
* This may not be true at this point in time but can be fixed
* independently. This option processing code starts with
* the instantiated acceptor instance and the final queue at
* this point.
*/
if (tcr->OPT_length != 0) {
/* Options to process */
int t_error = 0;
int sys_error = 0;
int do_disconnect = 0;
if (do_disconnect) {
/*
* An option failed which does not allow
* connection to be accepted.
*
* We allow T_CONN_RES to succeed and
* put a T_DISCON_IND on the eager queue.
*/
} else {
/*
* Original mp was either freed or set
* to ok_mp above, so use mp1 instead.
*/
goto finish;
}
}
/*
* Most likely success in setting options (except if
* eager->tcp_send_discon_ind set).
* mp1 option buffer represented by OPT_length/offset
* potentially modified and contains results of setting
* options at this point
*/
}
/* We no longer need mp1, since all options processing has passed */
/*
* This path should not be executed if listener and
* acceptor streams are the same.
*/
} else {
}
/*
* Done with the acceptor - free it
*
* Note: from this point on, no access to listener should be made
* as listener can be equal to acceptor.
*/
(void) tcp_clean_death(acceptor, 0);
/*
* We pass discon_mp to tcp_accept_finish to get on the right squeue.
*
* care of any data that arrived before accept() wad called.
* In case we already received a FIN then tcp_accept_finish will send up
* the ordrel. It will also send up a window update if the window
* has opened up.
*/
/*
* XXX: we currently have a problem if XTI application closes the
* acceptor stream in between. This problem exists in on10-gate also
* and is well know but nothing can be done short of major rewrite
* eager same squeue as listener (we can distinguish non socket
* listeners at the time of handling a SYN in tcp_input_listener)
* and do most of the work that tcp_accept_finish does here itself
* and then get behind the acceptor squeue to access the acceptor
* queue.
*/
/*
* We already have a ref on tcp so no need to do one before squeue_enter
*/
}
/*
* This is the STREAMS entry point for T_CONN_RES coming down on
* Acceptor STREAM when sockfs listener does accept processing.
* Read the block comment on top of tcp_input_listener().
*/
void
{
/*
* All Solaris components should pass a db_credp
* for this TPI message, hence we ASSERT.
* But in case there is some other M_PROTO that looks
* like a TPI message sent by some other kernel
* component, we check and return an error.
*/
return;
}
return;
}
case O_T_CONN_RES:
case T_CONN_RES:
/*
* We pass up an err ack if allocb fails. This will
* cause sockfs to issue a T_DISCON_REQ which will cause
* tcp_eager_blowoff to be called. sockfs will then call
* rq->q_qinfo->qi_qclose to cleanup the acceptor stream.
* we need to do the allocb up here because we have to
* make sure rq->q_qinfo->qi_qclose still points to the
* correct function (tcp_tpi_close_accept) in case allocb
* fails.
*/
/*
* Pre allocate the discon_ind mblk also. tcp_accept_finish will
* use it if something failed.
*/
sizeof (struct stroptions)), BPRI_HI);
return;
}
/* Put the ref for IP */
/*
* We should have minimum of 3 references on the conn
* at this point. One each for TCP and IP and one for
* the T_conn_ind that was sent up when the 3-way handshake
* completed. In the normal case we would also have another
* reference (making a total of 4) for the conn being in the
* classifier hash list. However the eager could have received
* an RST subsequently and tcp_closei_local could have removed
* the eager from the classifier hash list, hence we can't
* assert that reference.
*/
/* Need to get inside the listener perimeter */
}
/*
* At this point, the eager is detached from the listener
* but we still have an extra refs on eager (apart from the
* usual tcp references). The ref was placed in tcp_input_data
* before sending the conn_ind in tcp_send_conn_ind.
* The ref will be dropped in tcp_accept_finish().
*/
/*
* Send the new local address also up to sockfs. There
* should already be enough space in the mp that came
* down from soaccept().
*/
} else {
sin6->sin6_flowinfo = 0;
else
} else {
sin6->sin6_scope_id = 0;
}
sin6->__sin6_src_id = 0;
}
return;
default:
return;
}
}
/*
* The function called through squeue to get behind listener's perimeter to
* send a deferred conn_ind.
*/
/* ARGSUSED */
void
{
/*
* If listener has closed, it would have caused a
* we don't need to do anything more.
*/
return;
}
}
/*
* Sends the T_CONN_IND to the listener. The caller calls this
* functions via squeue to get inside the listener's perimeter
* once the 3 way hand shake is done a T_CONN_IND needs to be
* sent. As an optimization, the caller can call this directly
* if listener's perimeter is same as eager's.
*/
/* ARGSUSED */
void
{
/* retrieve the eager */
/*
* sending eager as an option since it violates
* the option semantics. So remove the eager as
*/
if (!TCP_IS_SOCKET(listener)) {
conn_ind->OPT_length = 0;
conn_ind->OPT_offset = 0;
}
/*
* If listener has closed, it would have caused a
* just need to return.
*/
return;
}
/*
* if the conn_req_q is full defer passing up the
* T_CONN_IND until space is availabe after t_accept()
* processing
*/
/*
* Take the eager out, if it is in the list of droppable eagers
* as we are here because the 3W handshake is over.
*/
/*
* The eager already has an extra ref put in tcp_input_data
* so that it stays till accept comes back even though it
* might get into TCPS_CLOSED as a result of a TH_RST etc.
*/
/* Move from SYN_RCVD to ESTABLISHED list */
/*
* Insert at end of the queue because sockfs
* sends down T_CONN_RES in chronological
* order. Leaving the older conn indications
* at front of the queue helps reducing search
* time.
*/
else
/*
* Delay sending up the T_conn_ind until we are
* done with the eager. Once we have have sent up
* the T_conn_ind, the accept can potentially complete
* any time and release the refhold we have on the eager.
*/
} else {
/*
* Defer connection on q0 and set deferred
* connection bit true
*/
/* take tcp out of q0 ... */
/* ... and place it at the end of q0 */
}
/* we have timed out before */
if (tcp->tcp_syn_rcvd_timeout != 0) {
tcp->tcp_syn_rcvd_timeout = 0;
if (listener->tcp_syn_defense &&
/*
* Turn off the defense mode if we
* believe the SYN attack is over.
*/
if (listener->tcp_ip_addr_cache) {
IP_ADDR_CACHE_SIZE * sizeof (ipaddr_t));
}
}
}
if (addr_cache != NULL) {
/*
* We have finished a 3-way handshake with this
* remote host. This proves the IP addr is good.
* Cache it!
*/
}
if (need_send_conn_ind)
}