Print this page
1775 1631's fix missed the case of data on the handshake's ACK

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/tcp/tcp_input.c
          +++ new/usr/src/uts/common/inet/tcp/tcp_input.c
↓ open down ↓ 3741 lines elided ↑ open up ↑
3742 3742                                  tcp->tcp_state = TCPS_SYN_RCVD;
3743 3743                                  freemsg(mp);
3744 3744                                  /* notification did not go up, so drop ref */
3745 3745                                  CONN_DEC_REF(connp);
3746 3746                                  /* ... and close the eager */
3747 3747                                  ASSERT(TCP_IS_DETACHED(tcp));
3748 3748                                  (void) tcp_close_detached(tcp);
3749 3749                                  return;
3750 3750                          }
3751 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 +                        /*
3752 3759                           * For passive open, trace receipt of final ACK as
3753 3760                           * tcp:::accept-established.
3754 3761                           */
3755 3762                          DTRACE_TCP5(accept__established, mlbk_t *, NULL,
3756 3763                              ip_xmit_attr_t *, connp->conn_ixa, void_ip_t *,
3757 3764                              iphdr, tcp_t *, tcp, tcph_t *, tcpha);
3758 3765                  } else {
3759 3766                          /*
3760 3767                           * 3-way handshake complete - this is a STREAMS based
3761 3768                           * socket, so pass up the T_CONN_IND.
↓ open down ↓ 2053 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX