make sure we call tcp_output() only if we have template.

This commit is contained in:
itojun 2001-02-11 06:39:35 +00:00
parent 02bc628319
commit 52e23efa5f

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcp_usrreq.c,v 1.59 2001/01/18 20:28:22 jdolecek Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.60 2001/02/11 06:39:35 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -484,7 +484,15 @@ tcp_usrreq(so, req, m, nam, control, p)
* After a receive, possibly send window update to peer.
*/
case PRU_RCVD:
(void) tcp_output(tp);
/*
* soreceive() calls this function when a user receives
* ancillary data on a listening socket. We don't call
* tcp_output in such a case, since there is no header
* template for a listening socket and hence the kernel
* will panic.
*/
if ((so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING)) != 0)
(void) tcp_output(tp);
break;
/*