From owner-freebsd-bugs@FreeBSD.ORG Sat Apr 30 19:20:11 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D10BC1065670 for ; Sat, 30 Apr 2011 19:20:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 904C28FC0A for ; Sat, 30 Apr 2011 19:20:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p3UJKBbB025810 for ; Sat, 30 Apr 2011 19:20:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p3UJKB9b025809; Sat, 30 Apr 2011 19:20:11 GMT (envelope-from gnats) Resent-Date: Sat, 30 Apr 2011 19:20:11 GMT Resent-Message-Id: <201104301920.p3UJKB9b025809@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dmitrij Tejblum Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6173E1065674 for ; Sat, 30 Apr 2011 19:12:38 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 4DAE08FC13 for ; Sat, 30 Apr 2011 19:12:38 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p3UJCbWT083634 for ; Sat, 30 Apr 2011 19:12:37 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p3UJCbpX083631; Sat, 30 Apr 2011 19:12:37 GMT (envelope-from nobody) Message-Id: <201104301912.p3UJCbpX083631@red.freebsd.org> Date: Sat, 30 Apr 2011 19:12:37 GMT From: Dmitrij Tejblum To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/156743: [lagg] [patch] if_lagg should not treat vlan-tagged frames as LACP frames X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Apr 2011 19:20:11 -0000 >Number: 156743 >Category: kern >Synopsis: [lagg] [patch] if_lagg should not treat vlan-tagged frames as LACP frames >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Apr 30 19:20:11 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Dmitrij Tejblum >Release: 8.2-STABLE >Organization: OOO Yandex >Environment: >Description: When if_lagg check if an input frame is a LACP (slow protocol) frame, it can treat VLAN-tagged LACP frames as LACP frames, since the NIC could have removed the VLAN tag. Since LACP frames must not be send VLAN-tagged, if_lagg should check for that. (Some broken switches sometimes incorrectly forward LACP frames to other ports, rather than handle them as LACP. It can result in VLAN-tagged LACP frames. If if_lagg receive such a forwarded LACP packet, it becomes confused. This patch provide some protection against this misbehaviour.) >How-To-Repeat: >Fix: Patch attached with submission follows: --- sys/net/if_lagg.c.00 2011-02-25 14:05:35.000000000 +0300 +++ sys/net/if_lagg.c 2011-04-28 15:24:00.000000000 +0400 @@ -1831,11 +1831,11 @@ lagg_lacp_input(struct lagg_softc *sc, s eh = mtod(m, struct ether_header *); etype = ntohs(eh->ether_type); /* Tap off LACP control messages */ - if (etype == ETHERTYPE_SLOW) { + if ((m->m_flags & M_VLANTAG) == 0 && etype == ETHERTYPE_SLOW) { m = lacp_input(lp, m); if (m == NULL) return (NULL); } >Release-Note: >Audit-Trail: >Unformatted: