From owner-freebsd-net@FreeBSD.ORG Thu Dec 23 08:20:47 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 C5C5316A4CE for ; Thu, 23 Dec 2004 08:20:47 +0000 (GMT) Received: from orion.erdves.lt (ns2.lrtc.net [217.9.240.98]) by mx1.FreeBSD.org (Postfix) with SMTP id 03C1743D31 for ; Thu, 23 Dec 2004 08:20:46 +0000 (GMT) (envelope-from donatas@lrtc.net) Received: (qmail 37836 invoked from network); 23 Dec 2004 08:20:44 -0000 Received: from p2p-241-242-ird.vln0.lrtc.net (HELO donatas) (217.9.241.242) by orion.erdves.lt with SMTP; 23 Dec 2004 08:20:44 -0000 Message-ID: <000601c4e8c8$4aed85c0$9f90a8c0@donatas> From: "Donatas" To: Date: Thu, 23 Dec 2004 10:20:41 +0200 Organization: AB Lietuvos Radijo ir Televizijos Centras MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Content-Type: text/plain; charset="iso-8859-4" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Re: double vlans - once again - experiment unsucsessfull X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Donatas List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Dec 2004 08:20:47 -0000 well, we've tired both "tunings" - the short-one suggested my M.Balikov = and the longer-one, suggested by B.Davis in both cases - "Protocol not supported" how we've done this: on FreeBSD 5.3 stable: edited if_vlan.c then=20 make buildworld make installworld mergemaster make clean the test: ifconfig vlan1 create ifconfig vlan2 create ifconfig vlan1 vlan 1 vlandev em0 ifconfig vlan2 vlan 2 vlandev vlan1 SIOCSETVLAN: "Protocol not supported" or maybe it's possible to use hardware and software tagging = simultaneously? we could achieve double tagging proces by combining hardware and = software tag in the ethernet packet. -------------------------------------------------------------------------= ------- Re: double vlans - once again. Brooks Davis Mon, 20 Dec 2004 10:28:56 -0800 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);