Print this page
195 Need replacement for nfs/lockd+klm

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/tl.c
          +++ new/usr/src/uts/common/io/tl.c
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  /*
  26   26   * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
       27 + * Copyright (c) 2012 by Delphix. All rights reserved.
  27   28   */
  28   29  
  29   30  /*
  30   31   * Multithreaded STREAMS Local Transport Provider.
  31   32   *
  32   33   * OVERVIEW
  33   34   * ========
  34   35   *
  35   36   * This driver provides TLI as well as socket semantics.  It provides
  36   37   * connectionless, connection oriented, and connection oriented with orderly
↓ open down ↓ 4208 lines elided ↑ open up ↑
4245 4246                      tep->te_state == TS_WREQ_ORDREL);
4246 4247                  /* connection oriented in data transfer */
4247 4248                  tl_connected_cots_addr_req(mp, tep);
4248 4249          }
4249 4250  }
4250 4251  
4251 4252  
4252 4253  static void
4253 4254  tl_connected_cots_addr_req(mblk_t *mp, tl_endpt_t *tep)
4254 4255  {
4255      -        tl_endpt_t              *peer_tep;
     4256 +        tl_endpt_t              *peer_tep = tep->te_conp;
4256 4257          size_t                  ack_sz;
4257 4258          mblk_t                  *ackmp;
4258 4259          struct T_addr_ack       *taa;
4259 4260          uchar_t                 *addr_startp;
4260 4261  
4261 4262          if (tep->te_closing) {
4262 4263                  freemsg(mp);
4263 4264                  return;
4264 4265          }
4265 4266  
     4267 +        if (peer_tep == NULL || peer_tep->te_closing) {
     4268 +                tl_error_ack(tep->te_wq, mp, TSYSERR, ECONNRESET, T_ADDR_REQ);
     4269 +                return;
     4270 +        }
     4271 +
4266 4272          ASSERT(tep->te_state >= TS_IDLE);
4267 4273  
4268 4274          ack_sz = sizeof (struct T_addr_ack);
4269 4275          ack_sz += T_ALIGN(tep->te_alen);
4270      -        peer_tep = tep->te_conp;
4271 4276          ack_sz += peer_tep->te_alen;
4272 4277  
4273 4278          ackmp = tpi_ack_alloc(mp, ack_sz, M_PCPROTO, T_ADDR_ACK);
4274 4279          if (ackmp == NULL) {
4275 4280                  (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR,
4276 4281                      "tl_connected_cots_addr_req: reallocb failed"));
4277 4282                  tl_memrecover(tep->te_wq, mp, ack_sz);
4278 4283                  return;
4279 4284          }
4280 4285  
↓ open down ↓ 1973 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX