summaryrefslogtreecommitdiffstats
path: root/sys/net/raw_usrreq.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-02-16 01:11:38 +0000
committerwollman <wollman@FreeBSD.org>1995-02-16 01:11:38 +0000
commit4326ce34b6197aeee660ccb96e5544108f570494 (patch)
tree5c5b7ca5329c326ffde3ea7013c16ce0259e6004 /sys/net/raw_usrreq.c
parent60c4643ea36b652c18ecae18191a86ee241b4cb4 (diff)
downloadFreeBSD-src-4326ce34b6197aeee660ccb96e5544108f570494.zip
FreeBSD-src-4326ce34b6197aeee660ccb96e5544108f570494.tar.gz
Attempting to bind() or connect() a routing socket, while meaningless,
shouldn't cause a panic. Obtained from: Stevens, vol. 2, p. 667
Diffstat (limited to 'sys/net/raw_usrreq.c')
-rw-r--r--sys/net/raw_usrreq.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/net/raw_usrreq.c b/sys/net/raw_usrreq.c
index f6bc1cb..c66f5ef 100644
--- a/sys/net/raw_usrreq.c
+++ b/sys/net/raw_usrreq.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)raw_usrreq.c 8.1 (Berkeley) 6/10/93
- * $Id: raw_usrreq.c,v 1.3 1994/08/18 22:35:21 wollman Exp $
+ * $Id: raw_usrreq.c,v 1.4 1994/10/08 22:38:25 phk Exp $
*/
#include <sys/param.h>
@@ -187,7 +187,6 @@ raw_usrreq(so, req, m, nam, control)
raw_detach(rp);
break;
-#ifdef notdef
/*
* If a socket isn't bound to a single address,
* the raw input routine will hand it anything
@@ -195,6 +194,8 @@ raw_usrreq(so, req, m, nam, control)
* nothing else around it should go to).
*/
case PRU_CONNECT:
+ error = EINVAL;
+#if 0
if (rp->rcb_faddr) {
error = EISCONN;
break;
@@ -202,16 +203,19 @@ raw_usrreq(so, req, m, nam, control)
nam = m_copym(nam, 0, M_COPYALL, M_WAIT);
rp->rcb_faddr = mtod(nam, struct sockaddr *);
soisconnected(so);
+#endif
break;
case PRU_BIND:
+ error = EINVAL;
+#if 0
if (rp->rcb_laddr) {
error = EINVAL; /* XXX */
break;
}
error = raw_bind(so, nam);
- break;
#endif
+ break;
case PRU_CONNECT2:
error = EOPNOTSUPP;
OpenPOWER on IntegriCloud