Date: Wed, 8 Nov 2006 18:24:14 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Jacques Fourie <jacques.fourie@gmail.com> Cc: freebsd-hackers@FreeBSD.org, "Christian S.J. Peron" <csjp@FreeBSD.org> Subject: Re: m_free() in if_bridge Message-ID: <20061108152414.GA16466@rambler-co.ru> In-Reply-To: <be2f52430611080637i35d5db61s5ffd7e276dd003bf@mail.gmail.com> References: <be2f52430611080637i35d5db61s5ffd7e276dd003bf@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 08, 2006 at 04:37:34PM +0200, Jacques Fourie wrote: > While browsing through if_bridge.c I noticed that if the bridge > interface is in monitoring mode, m_free() gets called on the packet > after passing it to BPF. Should this not be m_freem() instead or am I > missing something? The code in question can be found in the > bridge_input() function, line 1877 in if_bridge.c. >=20 It's been fixed already: : revision 1.85 : date: 2006/11/05 17:56:25; author: csjp; state: Exp; lines: +1 -1 : Fix possible leak when bridge is in monitor mode. Use m_freem() which will : free the entire chain, instead of using m_free() which will free just the : mbuf that was passed. :=20 : Discussed with: thompsa : MFC after: 3 days Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --4Ckj6UjgE2iN1+kY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFUfaeqRfpzJluFF4RArLGAJ9ylgpqg47ZYDeyVAAr4wXfrrJlbgCcD4Bn kRyptlpZ8+QkuFD+7xufFk8= =TaDj -----END PGP SIGNATURE----- --4Ckj6UjgE2iN1+kY--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061108152414.GA16466>