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.118.2.1 retrieving revision 1.119 diff -u -p -r1.118.2.1 -r1.119 --- src/sys/kern/uipc_socket.c 2006/06/19 04:07:16 1.118.2.1 +++ src/sys/kern/uipc_socket.c 2006/05/25 14:27:28 1.119 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_socket.c,v 1.118.2.1 2006/06/19 04:07:16 chap Exp $ */ +/* $NetBSD: uipc_socket.c,v 1.119 2006/05/25 14:27:28 yamt Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.118.2.1 2006/06/19 04:07:16 chap Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.119 2006/05/25 14:27:28 yamt Exp $"); #include "opt_sock_counters.h" #include "opt_sosend_loan.h" @@ -478,16 +478,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);