From owner-svn-src-head@freebsd.org Fri Apr 14 21:30:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 380D6D3EE6F; Fri, 14 Apr 2017 21:30:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 225912D9; Fri, 14 Apr 2017 21:30:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v3ELU9Xj056487 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 14 Apr 2017 14:30:10 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v3ELU9NE056486; Fri, 14 Apr 2017 14:30:09 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 14 Apr 2017 14:30:09 -0700 From: Gleb Smirnoff To: "Andrey V. Elsukov" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316822 - in head/sys: kern netinet netinet6 Message-ID: <20170414213009.GI1033@FreeBSD.org> References: <201704140900.v3E90mJU030549@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704140900.v3E90mJU030549@repo.freebsd.org> User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 21:30:12 -0000 Andrey, On Fri, Apr 14, 2017 at 09:00:48AM +0000, Andrey V. Elsukov wrote: A> Log: A> Rework r316770 to make it protocol independent and general, like we A> do for streaming sockets. A> A> And do more cleanup in the sbappendaddr_locked_internal() to prevent A> leak information from existing mbuf to the one, that will be possible A> created later by netgraph. Thanks! Your comment actually made me think that this can be improved... A> @@ -794,8 +794,20 @@ sbappendaddr_locked_internal(struct sock A> return (0); A> m->m_len = asa->sa_len; A> bcopy(asa, mtod(m, caddr_t), asa->sa_len); A> - if (m0) A> + if (m0) { A> m_clrprotoflags(m0); A> + m_tag_delete_chain(m0); A> + /* A> + * Clear some persistent info from pkthdr. A> + * We don't use m_demote(), because some netgraph consumers A> + * expect M_PKTHDR presence. A> + */ Looks like you are right and only netgraph wants to see M_PKTHDR there. Rest of datagram socket consumers just use m_nextpkt to differentiate records from parts of records. I'll see if we can fix ng_ksocket and use same code on datagram sockbufs as we do on stream ones. -- Totus tuus, Glebius.