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,10 +22,11 @@
* 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,11 +4251,11 @@
static void
tl_connected_cots_addr_req(mblk_t *mp, tl_endpt_t *tep)
{
- tl_endpt_t *peer_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,15 +4262,19 @@
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);
- 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,