Re: m_cat() does not update m_pkthdr.len

2002-06-24 Thread Bosko Milekic


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
[EMAIL PROTECTED]
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: m_cat() does not update m_pkthdr.len

2002-06-24 Thread Mike Silbersack


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


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



m_cat() does not update m_pkthdr.len

2002-06-23 Thread Yahel Zamir

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.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message