summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2013-05-24 02:18:37 +0000
committerjulian <julian@FreeBSD.org>2013-05-24 02:18:37 +0000
commit49df02549e7335dc4d20412472adcb0a8e36b575 (patch)
treebefb612b720c38402331f5f3d778a65501052449 /sys/kern
parentf3f987c0663f4b51385980c0fe61e5944e80b794 (diff)
downloadFreeBSD-src-49df02549e7335dc4d20412472adcb0a8e36b575.zip
FreeBSD-src-49df02549e7335dc4d20412472adcb0a8e36b575.tar.gz
Initialising the new fibnum field to a known value turns out to
be a GOOD IDEA (TM). Apparently MOST users set this (e.g. tcp and friends) but there are a few users that just assume that it is a sensible value but then go on to read it. These include SCTP, pf and the FLOWTABLE option (and maybe others).
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_mbuf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c
index 758f669..1762b72 100644
--- a/sys/kern/kern_mbuf.c
+++ b/sys/kern/kern_mbuf.c
@@ -470,6 +470,7 @@ mb_ctor_mbuf(void *mem, int size, void *arg, int how)
m->m_pkthdr.tso_segsz = 0;
m->m_pkthdr.ether_vtag = 0;
m->m_pkthdr.flowid = 0;
+ m->m_pkthdr.fibnum = 0;
SLIST_INIT(&m->m_pkthdr.tags);
#ifdef MAC
/* If the label init fails, fail the alloc */
@@ -695,6 +696,7 @@ mb_ctor_pack(void *mem, int size, void *arg, int how)
m->m_pkthdr.tso_segsz = 0;
m->m_pkthdr.ether_vtag = 0;
m->m_pkthdr.flowid = 0;
+ m->m_pkthdr.fibnum = 0;
SLIST_INIT(&m->m_pkthdr.tags);
#ifdef MAC
/* If the label init fails, fail the alloc */
@@ -720,6 +722,7 @@ m_pkthdr_init(struct mbuf *m, int how)
m->m_pkthdr.header = NULL;
m->m_pkthdr.len = 0;
m->m_pkthdr.flowid = 0;
+ m->m_pkthdr.fibnum = 0;
m->m_pkthdr.csum_flags = 0;
m->m_pkthdr.csum_data = 0;
m->m_pkthdr.tso_segsz = 0;
OpenPOWER on IntegriCloud