From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 15:39:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B07D307; Mon, 22 Dec 2014 15:39:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 471E4D18; Mon, 22 Dec 2014 15:39:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMFdPa9097774; Mon, 22 Dec 2014 15:39:25 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMFdPG2097773; Mon, 22 Dec 2014 15:39:25 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201412221539.sBMFdPG2097773@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 22 Dec 2014 15:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276058 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 15:39:25 -0000 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);