Subject: m_copyback() - broken/bad implementation ?
To: None <tech-net@NetBSD.ORG>
From: Darren Reed <darrenr@cyber.com.au>
List: tech-net
Date: 01/10/1998 00:06:30
I'm somewhat disturbed about m_copyback() returning void rather than (at
least) int.  The problem I see is that if it ever has to extend the mbuf
chain and the call to m_get() fails, there is no indication of this back
to the caller - aside from them manually checking.

An example of both of these situations (manual checking and nothing done)
can be found in /sys/net/rtsock.c (about lines 350 and 469).

Also, if M_PKTHDR isn't set in the first mbuf, there is no way to check
aside from recalculating the length of the mbuf chain and ensuring it is
as you expect.

Is this a deliberate feature or should we `fix' this ?

darren