Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 beta 3/9/83; site uthub.UUCP
Path: utzoo!utcsrgv!utai!uthub!thomson
From: thomson@uthub.UUCP (Brian Thomson)
Newsgroups: net.bugs.4bsd
Subject: Re: Panic in soqremque from sonewconn
Message-ID: <126@uthub.UUCP>
Date: Mon, 20-Feb-84 10:48:18 EST
Article-I.D.: uthub.126
Posted: Mon Feb 20 10:48:18 1984
Date-Received: Mon, 20-Feb-84 13:42:47 EST
References: <6928@watmath.UUCP>
Organization: CSRG, University of Toronto
Lines: 41

You run out of mbufs because someone is using UNIX domain datagrams,
which are chock full o' bugs.  In this case, it is a misuse of
the sbappendaddr() routine that causes the trouble.

I have a list of 5 bugs in that stuff, and fixes for all of them.
If there is sufficient interest I will post my uipc_usrreq.c, but
there is always the possibility that Berkeley will eventually do it
with different semantics.

I would recommend that all 4.2BSD sites either fix this stuff or disable
it.  Otherwise you run the risk of panics, lost mbufs, orphaned file
descriptors, and improper reference counts when some curious user at
your site tries it out.  Disabling is easy.  In sys/uipc_usrreq.c,
routine unp_usrreq(), change the switch case:

	case PRU_ATTACH:
		if (unp) {
			error = EISCONN;
			break;
		}
		error = unp_attach(so);
		break;

to be:

	case PRU_ATTACH:
		if (unp) {
			error = EISCONN;
			break;
		} else if (so->so_type == SOCK_DGRAM) {
			/* Disabled because of a buggy implementation */
			error = ESOCKTNOSUPPORT;
			break;
		}
		error = unp_attach(so);
		break;


-- 
			Brian Thomson,	    CSRG Univ. of Toronto
			{linus,ihnp4,uw-beaver,floyd,utzoo}!utcsrgv!thomson