Date: Tue, 25 Jun 2002 00:32:32 -0400 From: Bosko Milekic <bmilekic@unixdaemons.com> To: Mike Silbersack <silby@silby.com> Cc: Yahel Zamir <yahel@cwnt.com>, freebsd-hackers@FreeBSD.ORG Subject: Re: m_cat() does not update m_pkthdr.len Message-ID: <20020625003232.A27656@unixdaemons.com> In-Reply-To: <20020624211437.J55382-100000@patrocles.silby.com>; from silby@silby.com on Mon, Jun 24, 2002 at 09:15:09PM -0500 References: <C7DF4400240AFB4095D98C7C6EC2A34A477A79@bart.cwnt.com> <20020624211437.J55382-100000@patrocles.silby.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020625003232.A27656>