Subject: clear m_pkthdr on MGETHDR()
To: None <tech-net@netbsd.org>
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
List: tech-net
Date: 06/01/2001 14:05:03
is it okay if we clear out m_pkthdr on MGETHDR()? there's noone
initializes these fields at this moment.
itojun
Index: mbuf.h
===================================================================
RCS file: /cvsroot/kame/kame/netbsd/sys/sys/mbuf.h,v
retrieving revision 1.22
diff -u -r1.22 mbuf.h
--- mbuf.h 2000/12/02 04:53:43 1.22
+++ mbuf.h 2001/06/01 05:06:07
@@ -252,7 +252,7 @@
(m)->m_nextpkt = (struct mbuf *)NULL; \
(m)->m_data = (m)->m_pktdat; \
(m)->m_flags = M_PKTHDR; \
- (m)->m_pkthdr.aux = (struct mbuf *)NULL; \
+ bzero(&(m)->m_pkthdr, sizeof((m)->m_pkthdr)); \
} else \
(m) = m_retryhdr((how), (type)); \
} while (0)