Print this page
195 Need replacement for nfs/lockd+klm
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Jeremy Jones <jeremy@delphix.com>
Reviewed by: Jeff Biseda <jbiseda@delphix.com>

*** 22,31 **** --- 22,32 ---- * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ /* * Multithreaded STREAMS Local Transport Provider. *
*** 4250,4260 **** static void tl_connected_cots_addr_req(mblk_t *mp, tl_endpt_t *tep) { ! tl_endpt_t *peer_tep; size_t ack_sz; mblk_t *ackmp; struct T_addr_ack *taa; uchar_t *addr_startp; --- 4251,4261 ---- static void tl_connected_cots_addr_req(mblk_t *mp, tl_endpt_t *tep) { ! tl_endpt_t *peer_tep = tep->te_conp; size_t ack_sz; mblk_t *ackmp; struct T_addr_ack *taa; uchar_t *addr_startp;
*** 4261,4275 **** if (tep->te_closing) { freemsg(mp); return; } ASSERT(tep->te_state >= TS_IDLE); ack_sz = sizeof (struct T_addr_ack); ack_sz += T_ALIGN(tep->te_alen); - peer_tep = tep->te_conp; ack_sz += peer_tep->te_alen; ackmp = tpi_ack_alloc(mp, ack_sz, M_PCPROTO, T_ADDR_ACK); if (ackmp == NULL) { (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, --- 4262,4280 ---- if (tep->te_closing) { freemsg(mp); return; } + if (peer_tep == NULL || peer_tep->te_closing) { + tl_error_ack(tep->te_wq, mp, TSYSERR, ECONNRESET, T_ADDR_REQ); + return; + } + ASSERT(tep->te_state >= TS_IDLE); ack_sz = sizeof (struct T_addr_ack); ack_sz += T_ALIGN(tep->te_alen); ack_sz += peer_tep->te_alen; ackmp = tpi_ack_alloc(mp, ack_sz, M_PCPROTO, T_ADDR_ACK); if (ackmp == NULL) { (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR,