Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Feb 2009 14:08:28 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r189040 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern
Message-ID:  <200902251408.n1PE8SsE099031@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rwatson
Date: Wed Feb 25 14:08:28 2009
New Revision: 189040
URL: http://svn.freebsd.org/changeset/base/189040

Log:
  Merge r183689 from head to stable/7:
  
    Differentiate pr_usrreqs for stream and datagram UNIX domain sockets, and
    employ soreceive_dgram for the datagram case.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/kern/uipc_usrreq.c

Modified: stable/7/sys/kern/uipc_usrreq.c
==============================================================================
--- stable/7/sys/kern/uipc_usrreq.c	Wed Feb 25 13:47:09 2009	(r189039)
+++ stable/7/sys/kern/uipc_usrreq.c	Wed Feb 25 14:08:28 2009	(r189040)
@@ -247,20 +247,20 @@ static struct mbuf	*unp_addsockcred(stru
  * Definitions of protocols supported in the LOCAL domain.
  */
 static struct domain localdomain;
-static struct pr_usrreqs uipc_usrreqs;
+static struct pr_usrreqs uipc_usrreqs_dgram, uipc_usrreqs_stream;
 static struct protosw localsw[] = {
 {
 	.pr_type =		SOCK_STREAM,
 	.pr_domain =		&localdomain,
 	.pr_flags =		PR_CONNREQUIRED|PR_WANTRCVD|PR_RIGHTS,
 	.pr_ctloutput =		&uipc_ctloutput,
-	.pr_usrreqs =		&uipc_usrreqs
+	.pr_usrreqs =		&uipc_usrreqs_stream
 },
 {
 	.pr_type =		SOCK_DGRAM,
 	.pr_domain =		&localdomain,
 	.pr_flags =		PR_ATOMIC|PR_ADDR|PR_RIGHTS,
-	.pr_usrreqs =		&uipc_usrreqs
+	.pr_usrreqs =		&uipc_usrreqs_dgram
 },
 };
 
@@ -990,7 +990,7 @@ uipc_sockaddr(struct socket *so, struct 
 	return (0);
 }
 
-static struct pr_usrreqs uipc_usrreqs = {
+static struct pr_usrreqs uipc_usrreqs_dgram = {
 	.pru_abort = 		uipc_abort,
 	.pru_accept =		uipc_accept,
 	.pru_attach =		uipc_attach,
@@ -1006,6 +1006,27 @@ static struct pr_usrreqs uipc_usrreqs = 
 	.pru_sense =		uipc_sense,
 	.pru_shutdown =		uipc_shutdown,
 	.pru_sockaddr =		uipc_sockaddr,
+	.pru_soreceive =	soreceive_dgram,
+	.pru_close =		uipc_close,
+};
+
+static struct pr_usrreqs uipc_usrreqs_stream = {
+	.pru_abort = 		uipc_abort,
+	.pru_accept =		uipc_accept,
+	.pru_attach =		uipc_attach,
+	.pru_bind =		uipc_bind,
+	.pru_connect =		uipc_connect,
+	.pru_connect2 =		uipc_connect2,
+	.pru_detach =		uipc_detach,
+	.pru_disconnect =	uipc_disconnect,
+	.pru_listen =		uipc_listen,
+	.pru_peeraddr =		uipc_peeraddr,
+	.pru_rcvd =		uipc_rcvd,
+	.pru_send =		uipc_send,
+	.pru_sense =		uipc_sense,
+	.pru_shutdown =		uipc_shutdown,
+	.pru_sockaddr =		uipc_sockaddr,
+	.pru_soreceive =	soreceive_generic,
 	.pru_close =		uipc_close,
 };
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902251408.n1PE8SsE099031>