Have MGETHDR() always initialize m->m_pkthdr.rcvif to NULL.

In the past, not doing this has caused several hard to find
networking bugs, and the minor slowdown is deemed worthwhile.

Reviewed by:	wollman
This commit is contained in:
Archie Cobbs 2000-03-14 20:49:27 +00:00
parent 2793563fc4
commit c64c1c76b4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58076

View File

@ -251,8 +251,6 @@ union mcluster {
* MGETHDR(struct mbuf *m, int how, int type)
* allocates an mbuf and initializes it to contain a packet header
* and internal data.
*
* Warning: MGETHDR() does *not* initialize m->m_pkthdr.rcvif.
*/
#define MGET(m, how, type) do { \
struct mbuf *_mm; \
@ -302,6 +300,7 @@ union mcluster {
_mm->m_nextpkt = NULL; \
_mm->m_data = _mm->m_pktdat; \
_mm->m_flags = M_PKTHDR; \
_mm->m_pkthdr.rcvif = NULL; \
(m) = _mm; \
splx(_ms); \
} else { \