svn commit: r276058 - head/sys/kern
Gleb Smirnoff
glebius at FreeBSD.org
Mon Dec 22 15:39:25 UTC 2014
Author: glebius
Date: Mon Dec 22 15:39:24 2014
New Revision: 276058
URL: https://svnweb.freebsd.org/changeset/base/276058
Log:
In sbappend*() family of functions clear M_PROTO flags of incoming
mbufs. sbappendstream() already does this in m_demote().
PR: 196174
Sponsored by: Nginx, Inc.
Modified:
head/sys/kern/uipc_sockbuf.c
Modified: head/sys/kern/uipc_sockbuf.c
==============================================================================
--- head/sys/kern/uipc_sockbuf.c Mon Dec 22 09:21:41 2014 (r276057)
+++ head/sys/kern/uipc_sockbuf.c Mon Dec 22 15:39:24 2014 (r276058)
@@ -579,7 +579,7 @@ sbappend_locked(struct sockbuf *sb, stru
if (m == 0)
return;
-
+ m_clrprotoflags(m);
SBLASTRECORDCHK(sb);
n = sb->sb_mb;
if (n) {
@@ -732,6 +732,7 @@ sbappendrecord_locked(struct sockbuf *sb
if (m0 == 0)
return;
+ m_clrprotoflags(m0);
/*
* Put the first mbuf on the queue. Note this permits zero length
* records.
@@ -777,6 +778,8 @@ sbappendaddr_locked_internal(struct sock
return (0);
m->m_len = asa->sa_len;
bcopy(asa, mtod(m, caddr_t), asa->sa_len);
+ if (m0)
+ m_clrprotoflags(m0);
if (ctrl_last)
ctrl_last->m_next = m0; /* concatenate data to control */
else
@@ -872,6 +875,7 @@ sbappendcontrol_locked(struct sockbuf *s
if (space > sbspace(sb))
return (0);
+ m_clrprotoflags(m0);
n->m_next = m0; /* concatenate data to control */
SBLASTRECORDCHK(sb);
More information about the svn-src-head
mailing list