Update to FreeBSD Stable/9 2015-04-08

This commit is contained in:
Sebastian Huber
2015-04-08 15:37:49 +02:00
parent 76395ec881
commit 165dd8ea12
167 changed files with 5529 additions and 2365 deletions

View File

@@ -2085,7 +2085,7 @@ restart:
/* Socket buffer got some data that we shall deliver now. */
if (sb->sb_cc > 0 && !(flags & MSG_WAITALL) &&
((sb->sb_flags & SS_NBIO) ||
((so->so_state & SS_NBIO) ||
(flags & (MSG_DONTWAIT|MSG_NBIO)) ||
sb->sb_cc >= sb->sb_lowat ||
sb->sb_cc >= uio->uio_resid ||
@@ -2337,7 +2337,8 @@ soreceive_dgram(struct socket *so, struct sockaddr **psa, struct uio *uio,
* Process one or more MT_CONTROL mbufs present before any data mbufs
* in the first mbuf chain on the socket buffer. We call into the
* protocol to perform externalization (or freeing if controlp ==
* NULL).
* NULL). In some cases there can be only MT_CONTROL mbufs without
* MT_DATA mbufs.
*/
if (m->m_type == MT_CONTROL) {
struct mbuf *cm = NULL, *cmn;
@@ -2367,8 +2368,8 @@ soreceive_dgram(struct socket *so, struct sockaddr **psa, struct uio *uio,
cm = cmn;
}
}
KASSERT(m->m_type == MT_DATA, ("soreceive_dgram: !data"));
KASSERT(m == NULL || m->m_type == MT_DATA,
("soreceive_dgram: !data"));
while (m != NULL && uio->uio_resid > 0) {
len = uio->uio_resid;
if (len > m->m_len)
@@ -2385,9 +2386,10 @@ soreceive_dgram(struct socket *so, struct sockaddr **psa, struct uio *uio,
m->m_len -= len;
}
}
if (m != NULL)
if (m != NULL) {
flags |= MSG_TRUNC;
m_freem(m);
m_freem(m);
}
if (flagsp != NULL)
*flagsp |= flags;
return (0);