From owner-freebsd-net@FreeBSD.ORG Mon Nov 15 18:19:04 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 707A6106566C for ; Mon, 15 Nov 2010 18:19:04 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 029888FC18 for ; Mon, 15 Nov 2010 18:19:03 +0000 (UTC) Received: by wwd20 with SMTP id 20so298716wwd.31 for ; Mon, 15 Nov 2010 10:19:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:reply-to:from:to:subject:date :message-id:mime-version:content-type:content-transfer-encoding :x-mailer:thread-index:content-language; bh=v2ALSbzKjsV2eqcvJrjOyEQriB3n7piqpJ9sB+vJzJ8=; b=xZluNgrQVzIRF85CgTybwpTFLxUUlSVn378XOkc0ANKxISjHd3AHWee4Xj4V4/aAms B8zmFu9hA/P4zQ3bYQa+SR6fRoOBylljnlUvF0DMw/9GR+MqhYfiGFcKRuLqObnhXbJk SErUrcFWsVs8hUQ61A9TWIElA5n2zeUWVY6kI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=reply-to:from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding:x-mailer:thread-index:content-language; b=S/+cZrPdDiyo8E5toW2bMNM6MgioKtVtzOdIHr2qt7APu3A6M0vd7T7a+BIOk8BW0+ QzM7Lc1XK9tSnwpyklmmyGmN1TUw1SFd2Mgj852iHErkNIUTq2wtvIZrNC62QixOUZKR +KeD1SsxhoucElWKzPUgBAe5eQJQswe1cD7gQ= Received: by 10.227.127.79 with SMTP id f15mr6419889wbs.86.1289843705441; Mon, 15 Nov 2010 09:55:05 -0800 (PST) Received: from rimwks1x64 ([92.124.41.244]) by mx.google.com with ESMTPS id ga16sm149274wbb.19.2010.11.15.09.55.02 (version=SSLv3 cipher=RC4-MD5); Mon, 15 Nov 2010 09:55:03 -0800 (PST) From: rozhuk.im@gmail.com To: Date: Tue, 16 Nov 2010 01:55:01 +0800 Message-ID: <4ce173f7.10d0e30a.7624.0f77@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcuE7jljyOXsI62TTZWDAYajvm+cmQ== Content-Language: ru Subject: kern/152141: [vlan] encapsulate vlan in ng_ether before output to if X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rozhuk.IM@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 18:19:04 -0000 This is a patched version of original function code /* * If underlying interface can not do VLAN tag insertion itself * then attach a packet tag that holds it. */ if ((m->m_flags & M_VLANTAG) && (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) =3D=3D 0) { m =3D ether_vlanencap(m, m->m_pkthdr.ether_vtag); if (m =3D=3D NULL) { ifp->if_oerrors++; return (ENOBUFS); } m->m_flags &=3D ~M_VLANTAG; } was added. Iam does not test this path - haven=92t net with vlan support. Code was taken from if_bridge and adapted. =A0 -- Rozhuk Ivan =A0=20