Date: Mon, 22 Dec 2014 15:39:25 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276058 - head/sys/kern Message-ID: <201412221539.sBMFdPG2097773@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412221539.sBMFdPG2097773>