From owner-freebsd-net@FreeBSD.ORG Wed Oct 19 21:47:25 2011 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 434FE1065670; Wed, 19 Oct 2011 21:47:25 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 57E1D8FC18; Wed, 19 Oct 2011 21:47:24 +0000 (UTC) Received: by wwn22 with SMTP id 22so6990204wwn.1 for ; Wed, 19 Oct 2011 14:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=OxalIvk4+tZ8m1MvCWRki5JOGuV4Mt+m6AUgDUZc3T4=; b=INYQjdlQXVcsCCLHsM8MNVrbqElhxfzqkYqe4H7O1VFzVZxg2bbcw7fh24gguZMy3d 5LMbsHVAOWTkOioYktA9umSwJmJmtKX5FfpRboAZTMjKxxDJTHhP+zlHA5yUGtNwhbQ/ ffQwt2qwZy3ah0ZPzrUb6WOIZK02+RCkNKGiM= MIME-Version: 1.0 Received: by 10.227.127.205 with SMTP id h13mr3172149wbs.92.1319060843315; Wed, 19 Oct 2011 14:47:23 -0700 (PDT) Received: by 10.180.96.104 with HTTP; Wed, 19 Oct 2011 14:47:23 -0700 (PDT) In-Reply-To: References: <4e9e0de3.4364cc0a.38b5.ffffc94f@mx.google.com> <4e9e6ba6.c972cd0a.3d45.ffffd504@mx.google.com> Date: Wed, 19 Oct 2011 17:47:23 -0400 Message-ID: From: Ryan Stone To: Juli Mallett Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net , Rozhuk.IM@gmail.com Subject: Re: ether_demux does not handle frames with embedded vlan tags X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 21:47:25 -0000 On Wed, Oct 19, 2011 at 3:30 PM, Juli Mallett wrote: > Why should the requirements for the Netgraph path be any different to > the non-Netgraph path? =A0If drivers must ensure that frames that reach > ether_demux have had their VLAN tags stripped, so should Netgraph > things that act like drivers. =A0So why don't you move that logic into > ether_demux from the ether_input path, or have Netgraph use the > ether_input path? Netgraph can't use the ether_input path because ether_input passes the packet to the lower hook. It also passes the packet to things like carp or if_bridge if necessary. I'm not sure whether it is intended behaviour that the upper hook bypasses carp and if_bridge. if_bridge also depends on the vlan stripping behaviour, so vlan stripping cannot be moved to ether_demux without re-implementing it in bridge_input.