sync with OpenBSD -current
This commit is contained in:
parent
caf62be22c
commit
b3ecf9fa9a
56 changed files with 383 additions and 289 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: uipc_domain.c,v 1.64 2023/05/18 10:23:19 mvs Exp $ */
|
||||
/* $OpenBSD: uipc_domain.c,v 1.65 2024/01/11 14:15:11 bluhm Exp $ */
|
||||
/* $NetBSD: uipc_domain.c,v 1.14 1996/02/09 19:00:44 christos Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -62,7 +62,6 @@ const struct domain *const domains[] = {
|
|||
|
||||
void pffasttimo(void *);
|
||||
void pfslowtimo(void *);
|
||||
const struct domain * pffinddomain(int);
|
||||
|
||||
void
|
||||
domaininit(void)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: uipc_socket.c,v 1.312 2023/12/19 21:34:22 bluhm Exp $ */
|
||||
/* $OpenBSD: uipc_socket.c,v 1.313 2024/01/11 14:15:11 bluhm Exp $ */
|
||||
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -148,7 +148,7 @@ soinit(void)
|
|||
}
|
||||
|
||||
struct socket *
|
||||
soalloc(int wait)
|
||||
soalloc(const struct domain *dp, int wait)
|
||||
{
|
||||
struct socket *so;
|
||||
|
||||
|
@ -156,7 +156,7 @@ soalloc(int wait)
|
|||
PR_ZERO);
|
||||
if (so == NULL)
|
||||
return (NULL);
|
||||
rw_init_flags(&so->so_lock, "solock", RWL_DUPOK);
|
||||
rw_init_flags(&so->so_lock, dp->dom_name, RWL_DUPOK);
|
||||
refcnt_init(&so->so_refcnt);
|
||||
klist_init(&so->so_rcv.sb_klist, &socket_klistops, so);
|
||||
klist_init(&so->so_snd.sb_klist, &socket_klistops, so);
|
||||
|
@ -190,7 +190,7 @@ socreate(int dom, struct socket **aso, int type, int proto)
|
|||
return (EPROTONOSUPPORT);
|
||||
if (prp->pr_type != type)
|
||||
return (EPROTOTYPE);
|
||||
so = soalloc(M_WAIT);
|
||||
so = soalloc(pffinddomain(dom), M_WAIT);
|
||||
so->so_type = type;
|
||||
if (suser(p) == 0)
|
||||
so->so_state = SS_PRIV;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: uipc_socket2.c,v 1.139 2023/12/18 13:11:20 bluhm Exp $ */
|
||||
/* $OpenBSD: uipc_socket2.c,v 1.140 2024/01/11 14:15:11 bluhm Exp $ */
|
||||
/* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -188,7 +188,7 @@ sonewconn(struct socket *head, int connstatus, int wait)
|
|||
return (NULL);
|
||||
if (head->so_qlen + head->so_q0len > head->so_qlimit * 3)
|
||||
return (NULL);
|
||||
so = soalloc(wait);
|
||||
so = soalloc(head->so_proto->pr_domain, wait);
|
||||
if (so == NULL)
|
||||
return (NULL);
|
||||
so->so_type = head->so_type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue