Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site hammer.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!tektronix!orca!hammer!steveh
From: steveh@hammer.UUCP (Stephen Hemminger)
Newsgroups: net.bugs.4bsd
Subject: Re: Have Unix-domain datagrams been fixed yet?
Message-ID: <1514@hammer.UUCP>
Date: Mon, 23-Sep-85 11:44:16 EDT
Article-I.D.: hammer.1514
Posted: Mon Sep 23 11:44:16 1985
Date-Received: Thu, 26-Sep-85 07:13:53 EDT
References: <2345@sdcrdcf.UUCP>
Reply-To: steveh@hammer.UUCP (Stephen Hemminger)
Distribution: net
Organization: Tektronix, Wilsonville OR
Lines: 52

In article <2345@sdcrdcf.UUCP> lwall@sdcrdcf.UUCP (Larry Wall) writes:
>I think we've been running into the old problem with Unix-domain datagrams
>crashing the system.  We'd really like to use them in an application here.

>We're getting m_getclr panics and I wonder if anybody's fixed this yet.
>Could some kind soul tell me what the sequence of events is, and whether
>a fix is possible?  Is it fixed in 4.3?
Yes, yes, yes. fixes follow.

>Thanks.
>Larry Wall
>{allegra,burdvax,cbosgd,hplabs,ihnp4,sdcsvax}!sdcrdcf!lwall

Caveat:Your line numbers will vary.
*** sys/uipc_usrreq.c	Mon Sep 23 08:40:43 1985
--- sys/uipc_usrreq.c.old	Mon Sep 23 08:40:53 1985
***************
*** 168,183
  				if (error)
  					break;
  			}
! 			/*
! 			 * Put data address and rights on receiver's queue.
! 			 * There's no record of source socket's
! 			 * name, so send null name for the moment.
! 			 * 
! 			 * If no space (returns 0), then m will be
! 			 * freed later.
! 			 */
! 			if (sbappendaddr(&so2->so_rcv, &sun_noname,
! 				m, rights) != 0) {
  				sbwakeup(&so2->so_rcv);
  				m = 0;
  			}

--- 164,176 -----
  				if (error)
  					break;
  			}
! 			if (sbspace(&so2->so_rcv) > 0) {
! 				/*
! 				 * There's no record of source socket's
! 				 * name, so send null name for the moment.
! 				 */
! 				(void) sbappendaddr(&so2->so_rcv,
! 				    &sun_noname, m, rights);
  				sbwakeup(&so2->so_rcv);
  				m = 0;
  			}
---
P.s: If you want the changes to make Out of Band Data work in
     unix domain (this isn't in 4.3). send me a note.