From owner-freebsd-net@FreeBSD.ORG Tue Oct 18 16:46:00 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 4E2F6106566B for ; Tue, 18 Oct 2011 16:46:00 +0000 (UTC) (envelope-from rysto32@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 E03BC8FC14 for ; Tue, 18 Oct 2011 16:45:59 +0000 (UTC) Received: by wwi18 with SMTP id 18so1136975wwi.31 for ; Tue, 18 Oct 2011 09:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=kGShnbTBkMwtTl+QW7lnTP2E/SvbsKaFloDoXUhEZCk=; b=KXTJuRsuWB6gWreswmkxqNNrtbuxby0fzA7/Ih9JGesQsUukXTp8mFIF4UF1klKisz u1TdxczHipcBgQYRXVVhI5AGSJIZII7ZVkJb7YMjZeiCXLiMZ0l6dsiRT5fnqqhRg37Z sO8kJf8xn2dekw57+de0hv7IB15rCivfhKSDg= MIME-Version: 1.0 Received: by 10.227.24.1 with SMTP id t1mr1093407wbb.107.1318956358848; Tue, 18 Oct 2011 09:45:58 -0700 (PDT) Received: by 10.180.96.104 with HTTP; Tue, 18 Oct 2011 09:45:58 -0700 (PDT) Date: Tue, 18 Oct 2011 12:45:58 -0400 Message-ID: From: Ryan Stone To: freebsd-net Content-Type: text/plain; charset=ISO-8859-1 Subject: 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: Tue, 18 Oct 2011 16:46:00 -0000 ether_demux currently assumes that all vlan-tagged packets that it sees have had the vlan stripped out and the M_VLAN tag is set, so it never checks the ether type for a vlan. However ng_ether_rcv_upper currently does not guarantee that this is the case(and there may be other code paths where this is also true). Does anybody have any strong feelings as to where the fix should go? Making ether_demux handle it is guaranteed to catch all cases but it does add a bit more overhead to check for a vlan tag at each stage.