From owner-cvs-src@FreeBSD.ORG Mon Feb 14 18:14:43 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B39E516A4CE; Mon, 14 Feb 2005 18:14:43 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 879A143D1F; Mon, 14 Feb 2005 18:14:42 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j1EIESUV017167; Mon, 14 Feb 2005 20:14:28 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 66144-18; Mon, 14 Feb 2005 20:14:27 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j1EIERo4017158 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 14 Feb 2005 20:14:27 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id j1EIEVDb069694; Mon, 14 Feb 2005 20:14:31 +0200 (EET) (envelope-from ru) Date: Mon, 14 Feb 2005 20:14:31 +0200 From: Ruslan Ermilov To: Sam Leffler Message-ID: <20050214181431.GA69635@ip.net.ua> References: <200502140829.j1E8TgDs086634@repoman.freebsd.org> <4210D210.3080700@errno.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline In-Reply-To: <4210D210.3080700@errno.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at ip.net.ua cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/net if_ethersubr.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2005 18:14:43 -0000 --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Sam, On Mon, Feb 14, 2005 at 08:30:08AM -0800, Sam Leffler wrote: > Ruslan Ermilov wrote: > >ru 2005-02-14 08:29:42 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/net if_ethersubr.c=20 > > Log: > > If no vlan(4) interfaces are configured for the interface, and the > > driver did VLAN decapsulation in hardware, we were passing a frame > > as if it came for the parent (non-VLAN) interface. Stop this from > > happening. > > =20 > > Reminded by: glebius > > Security: This could pose a security risk in some setups > > =20 > > Revision Changes Path > > 1.183 +10 -3 src/sys/net/if_ethersubr.c > >http://cvsweb.FreeBSD.org/src/sys/net/if_ethersubr.c.diff?r1=3D1.182&r2= =3D1.183 > > > > > Looks like you should use m_tag_find instead of=20 > m_tag_first+m_tag_locate. >=20 Unfortunately m_tag_find() is only the compatibility function and doesn't work for FreeBSD mtags. > This also has the potential to noticeably=20 > affect performance so I think a better solution is needed. >=20 Here are my thoughts. On a typical input path, there will be either one or zero mtags, one if driver provided us with the VLAN mtag, so effectively we replaced "ifp->if_nvlans" with "m_tag_first(m) !=3D NULL", and this doesn't look like a huge performance downgrade to me, if at all. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --sm4nu43k4a2Rpi4c Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFCEOqHqRfpzJluFF4RAvNoAJ9a0t1AgPeC2/1/OnHfhPirkRDtCwCdGYsc diiw64qY6xFXbgIW75ksxmA= =N8Sj -----END PGP SIGNATURE----- --sm4nu43k4a2Rpi4c--