From owner-freebsd-hackers Mon Jun 24 21:32:47 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from angelica.unixdaemons.com (angelica.unixdaemons.com [209.148.64.135]) by hub.freebsd.org (Postfix) with ESMTP id 01E8137B40B for ; Mon, 24 Jun 2002 21:32:43 -0700 (PDT) Received: from angelica.unixdaemons.com (bmilekic@localhost.unixdaemons.com [127.0.0.1]) by angelica.unixdaemons.com (8.12.4/8.12.1) with ESMTP id g5P4WY7g028460; Tue, 25 Jun 2002 00:32:34 -0400 (EDT) X-Authentication-Warning: angelica.unixdaemons.com: Host bmilekic@localhost.unixdaemons.com [127.0.0.1] claimed to be angelica.unixdaemons.com Received: (from bmilekic@localhost) by angelica.unixdaemons.com (8.12.4/8.12.1/Submit) id g5P4WWGT028456; Tue, 25 Jun 2002 00:32:32 -0400 (EDT) (envelope-from bmilekic) Date: Tue, 25 Jun 2002 00:32:32 -0400 From: Bosko Milekic To: Mike Silbersack Cc: Yahel Zamir , freebsd-hackers@FreeBSD.ORG Subject: Re: m_cat() does not update m_pkthdr.len Message-ID: <20020625003232.A27656@unixdaemons.com> References: <20020624211437.J55382-100000@patrocles.silby.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020624211437.J55382-100000@patrocles.silby.com>; from silby@silby.com on Mon, Jun 24, 2002 at 09:15:09PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Jun 24, 2002 at 09:15:09PM -0500, Mike Silbersack wrote: > > On Sun, 23 Jun 2002, Yahel Zamir wrote: > > > Hi, > > > > During development of networking code in FreeBSD kernel, > > we noticed that m_cat(p1, p2) does NOT do some necessary things: > > p1->m_pkthdr.len += p2->m_pkthdr.len; > > p2->m_flags &= ~M_PKTHDR; > > > > Thanks, > > Yahel. > > Please notify Luigi or Bosko. See the -net archives as well, I believe > that this has been discussed in the last week or two. > > Mike "Silby" Silbersack There is not much about m_cat() that says that p1 has to be a packet header and that also says that p2 is a packet header or that, if it is, its packet headerness will be removed. It is up to the surrounding code to make sure that it properly deals with p1 and p2 before concatenating p2 to p1 (or after). To place the added requirement that p1 be a packet header type mbuf would be placing an additional requirement on callers to m_cat(). -- Bosko Milekic bmilekic@unixdaemons.com bmilekic@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message