Date: Fri, 24 May 2013 02:18:37 +0000 (UTC) From: Julian Elischer <julian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250952 - head/sys/kern Message-ID: <201305240218.r4O2IbIV090909@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: julian Date: Fri May 24 02:18:37 2013 New Revision: 250952 URL: http://svnweb.freebsd.org/changeset/base/250952 Log: 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). Modified: head/sys/kern/kern_mbuf.c Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Fri May 24 00:49:12 2013 (r250951) +++ head/sys/kern/kern_mbuf.c Fri May 24 02:18:37 2013 (r250952) @@ -470,6 +470,7 @@ mb_ctor_mbuf(void *mem, int size, void * 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 * 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305240218.r4O2IbIV090909>