Merge 4.4-Lite-2: use M_NOWAIT in in_pcballoc(), and return EACCES rather

than EPERM on illegal attempt to bind a reserved port.

Obtained from:	4.4BSD-Lite-2
This commit is contained in:
Garrett Wollman 1995-09-21 17:55:49 +00:00
parent 2180b92513
commit 2469dd60b7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10940

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1982, 1986, 1991, 1993
* Copyright (c) 1982, 1986, 1991, 1993, 1995
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -30,8 +30,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)in_pcb.c 8.2 (Berkeley) 1/4/94
* $Id: in_pcb.c,v 1.11 1995/05/03 07:16:51 davidg Exp $
* @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
* $Id: in_pcb.c,v 1.12 1995/05/30 08:09:28 rgrimes Exp $
*/
#include <sys/param.h>
@ -137,7 +137,7 @@ in_pcbbind(inp, nam)
/* GROSS */
if (ntohs(lport) < IPPORT_RESERVED &&
(error = suser(p->p_ucred, &p->p_acflag)))
return (error);
return (EACCES);
t = in_pcblookup(head, zeroin_addr, 0,
sin->sin_addr, lport, wild);
if (t && (reuseport & t->inp_socket->so_options) == 0)