Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Apr 2011 19:12:37 GMT
From:      Dmitrij Tejblum <tejblum@yandex-team.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/156743: [lagg] [patch] if_lagg should not treat vlan-tagged frames as LACP frames
Message-ID:  <201104301912.p3UJCbpX083631@red.freebsd.org>
Resent-Message-ID: <201104301920.p3UJKB9b025809@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104301912.p3UJCbpX083631>