3732 CONN_INC_REF(connp);
3733
3734 if (!tcp_newconn_notify(tcp, ira)) {
3735 /*
3736 * The state-change probe for SYN_RCVD ->
3737 * ESTABLISHED has not fired yet. We reset
3738 * the state to SYN_RCVD so that future
3739 * state-change probes report correct state
3740 * transistions.
3741 */
3742 tcp->tcp_state = TCPS_SYN_RCVD;
3743 freemsg(mp);
3744 /* notification did not go up, so drop ref */
3745 CONN_DEC_REF(connp);
3746 /* ... and close the eager */
3747 ASSERT(TCP_IS_DETACHED(tcp));
3748 (void) tcp_close_detached(tcp);
3749 return;
3750 }
3751 /*
3752 * For passive open, trace receipt of final ACK as
3753 * tcp:::accept-established.
3754 */
3755 DTRACE_TCP5(accept__established, mlbk_t *, NULL,
3756 ip_xmit_attr_t *, connp->conn_ixa, void_ip_t *,
3757 iphdr, tcp_t *, tcp, tcph_t *, tcpha);
3758 } else {
3759 /*
3760 * 3-way handshake complete - this is a STREAMS based
3761 * socket, so pass up the T_CONN_IND.
3762 */
3763 tcp_t *listener = tcp->tcp_listener;
3764 mblk_t *mp = tcp->tcp_conn.tcp_eager_conn_ind;
3765
3766 tcp->tcp_tconnind_started = B_TRUE;
3767 tcp->tcp_conn.tcp_eager_conn_ind = NULL;
3768 ASSERT(mp != NULL);
3769 /*
3770 * We are here means eager is fine but it can
3771 * get a TH_RST at any point between now and till
|
3732 CONN_INC_REF(connp);
3733
3734 if (!tcp_newconn_notify(tcp, ira)) {
3735 /*
3736 * The state-change probe for SYN_RCVD ->
3737 * ESTABLISHED has not fired yet. We reset
3738 * the state to SYN_RCVD so that future
3739 * state-change probes report correct state
3740 * transistions.
3741 */
3742 tcp->tcp_state = TCPS_SYN_RCVD;
3743 freemsg(mp);
3744 /* notification did not go up, so drop ref */
3745 CONN_DEC_REF(connp);
3746 /* ... and close the eager */
3747 ASSERT(TCP_IS_DETACHED(tcp));
3748 (void) tcp_close_detached(tcp);
3749 return;
3750 }
3751 /*
3752 * tcp_newconn_notify() changes conn_upcalls and
3753 * connp->conn_upper_handle. Fix things now, in case
3754 * there's data attached to this ack.
3755 */
3756 if (connp->conn_upcalls != NULL)
3757 sockupcalls = connp->conn_upcalls;
3758 /*
3759 * For passive open, trace receipt of final ACK as
3760 * tcp:::accept-established.
3761 */
3762 DTRACE_TCP5(accept__established, mlbk_t *, NULL,
3763 ip_xmit_attr_t *, connp->conn_ixa, void_ip_t *,
3764 iphdr, tcp_t *, tcp, tcph_t *, tcpha);
3765 } else {
3766 /*
3767 * 3-way handshake complete - this is a STREAMS based
3768 * socket, so pass up the T_CONN_IND.
3769 */
3770 tcp_t *listener = tcp->tcp_listener;
3771 mblk_t *mp = tcp->tcp_conn.tcp_eager_conn_ind;
3772
3773 tcp->tcp_tconnind_started = B_TRUE;
3774 tcp->tcp_conn.tcp_eager_conn_ind = NULL;
3775 ASSERT(mp != NULL);
3776 /*
3777 * We are here means eager is fine but it can
3778 * get a TH_RST at any point between now and till
|