From owner-freebsd-net@FreeBSD.ORG Mon Dec 20 18:28:22 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A99CA16A4DF for ; Mon, 20 Dec 2004 18:28:22 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 790F643D2D for ; Mon, 20 Dec 2004 18:28:22 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id iBKISemL015804; Mon, 20 Dec 2004 10:28:40 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id iBKISdMh015803; Mon, 20 Dec 2004 10:28:39 -0800 Date: Mon, 20 Dec 2004 10:28:39 -0800 From: Brooks Davis To: Mihail Balikov Message-ID: <20041220182839.GB12399@odin.ac.hmc.edu> References: <001e01c4e527$78caac10$9f90a8c0@donatas> <002501c4e533$7df445f0$c7cdf0d5@misho> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nVMJ2NtxeReIH9PS" Content-Disposition: inline In-Reply-To: <002501c4e533$7df445f0$c7cdf0d5@misho> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-net@freebsd.org Subject: Re: double vlans - once again. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Dec 2004 18:28:22 -0000 --nVMJ2NtxeReIH9PS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 18, 2004 at 08:57:58PM +0200, Mihail Balikov wrote: > I have done this 2 years ago for FreeBSD 4-STABLE >=20 > in sys/net/if_vlan.c in vlan_config(), replace >=20 > if (p->if_data.ifi_type !=3D IFT_ETHER) > return EPROTONOSUPPORT; >=20 > with >=20 > if (p->if_data.ifi_type !=3D IFT_ETHER && > p->if_data.ifi_type !=3D IFT_L2VLAN) > return EPROTONOSUPPORT; Hmm, for -current this appears incomplete. I think the following is what is needed. Any one in a position to test this? -- Brooks Index: if_vlan.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/net/if_vlan.c,v retrieving revision 1.73 diff -u -p -r1.73 if_vlan.c --- if_vlan.c 15 Aug 2004 06:24:42 -0000 1.73 +++ if_vlan.c 20 Dec 2004 18:25:48 -0000 @@ -273,7 +273,8 @@ vlan_clone_match_ethertag(struct if_clon /* Check for . style interface names. */ IFNET_RLOCK(); TAILQ_FOREACH(ifp, &ifnet, if_link) { - if (ifp->if_type !=3D IFT_ETHER) + if (ifp->if_type !=3D IFT_ETHER && + ifp->if_type !=3D IFT_L2VLAN) continue; if (strncmp(ifp->if_xname, name, strlen(ifp->if_xname)) !=3D 0) continue; @@ -566,6 +567,7 @@ vlan_input(struct ifnet *ifp, struct mbu } else { switch (ifp->if_type) { case IFT_ETHER: + case IFT_L2VLAN: if (m->m_len < sizeof(*evl) && (m =3D m_pullup(m, sizeof(*evl))) =3D=3D NULL) { if_printf(ifp, "cannot pullup VLAN header\n"); @@ -641,7 +643,8 @@ vlan_config(struct ifvlan *ifv, struct i =20 VLAN_LOCK_ASSERT(); =20 - if (p->if_data.ifi_type !=3D IFT_ETHER) + if (p->if_data.ifi_type !=3D IFT_ETHER && + p->if_data.ifi_type !=3D IFT_L2VLAN) return (EPROTONOSUPPORT); if (ifv->ifv_p) return (EBUSY); --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --nVMJ2NtxeReIH9PS Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBxxnWXY6L6fI4GtQRAlEqAKCeGEAMg6JJb4ep7JJU9IrsQh5EVwCgokqH PEmV3TLjc5/nWH0OuM4Sosg= =NGb5 -----END PGP SIGNATURE----- --nVMJ2NtxeReIH9PS--