Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/kern/uipc_socket.c,v retrieving revision 1.108.2.2 retrieving revision 1.108.2.3 diff -u -p -r1.108.2.2 -r1.108.2.3 --- src/sys/kern/uipc_socket.c 2006/10/25 07:53:19 1.108.2.2 +++ src/sys/kern/uipc_socket.c 2006/10/25 12:58:56 1.108.2.3 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_socket.c,v 1.108.2.2 2006/10/25 07:53:19 ghen Exp $ */ +/* $NetBSD: uipc_socket.c,v 1.108.2.3 2006/10/25 12:58:56 ghen Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.108.2.2 2006/10/25 07:53:19 ghen Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.108.2.3 2006/10/25 12:58:56 ghen Exp $"); #include "opt_sock_counters.h" #include "opt_sosend_loan.h" @@ -461,16 +461,7 @@ socreate(int dom, struct socket **aso, i prp = pffindproto(dom, proto, type); else prp = pffindtype(dom, type); - if (prp == 0) { - /* no support for domain */ - if (pffinddomain(dom) == 0) - return (EAFNOSUPPORT); - /* no support for socket type */ - if (proto == 0 && type != 0) - return (EPROTOTYPE); - return (EPROTONOSUPPORT); - } - if (prp->pr_usrreq == 0) + if (prp == 0 || prp->pr_usrreq == 0) return (EPROTONOSUPPORT); if (prp->pr_type != type) return (EPROTOTYPE);