Update to FreeBSD head 2017-04-04

Git mirror commit 642b174daddbd0efd9bb5f242c43f4ab4db6869f.
This commit is contained in:
Sebastian Huber
2017-04-04 09:36:57 +02:00
parent 3360232e95
commit de8a76da2f
530 changed files with 26497 additions and 31504 deletions

View File

@@ -842,6 +842,9 @@ uipc_listen(struct socket *so, int backlog, struct thread *td)
struct unpcb *unp;
int error;
if (so->so_type != SOCK_STREAM && so->so_type != SOCK_SEQPACKET)
return (EOPNOTSUPP);
unp = sotounpcb(so);
KASSERT(unp != NULL, ("uipc_listen: unp == NULL"));
@@ -2058,6 +2061,7 @@ unp_internalize(struct mbuf **controlp, struct thread *td)
struct filedescent *fde, **fdep, *fdev;
struct file *fp;
struct timeval *tv;
struct timespec *ts;
int i, *fdp;
void *data;
socklen_t clen = control->m_len, datalen;
@@ -2178,6 +2182,30 @@ unp_internalize(struct mbuf **controlp, struct thread *td)
bintime(bt);
break;
case SCM_REALTIME:
*controlp = sbcreatecontrol(NULL, sizeof(*ts),
SCM_REALTIME, SOL_SOCKET);
if (*controlp == NULL) {
error = ENOBUFS;
goto out;
}
ts = (struct timespec *)
CMSG_DATA(mtod(*controlp, struct cmsghdr *));
nanotime(ts);
break;
case SCM_MONOTONIC:
*controlp = sbcreatecontrol(NULL, sizeof(*ts),
SCM_MONOTONIC, SOL_SOCKET);
if (*controlp == NULL) {
error = ENOBUFS;
goto out;
}
ts = (struct timespec *)
CMSG_DATA(mtod(*controlp, struct cmsghdr *));
nanouptime(ts);
break;
default:
error = EINVAL;
goto out;