Subject: kern/11109: ETHER_MAX_LEN needs to increase for VLANs
To: None <gnats-bugs@gnats.netbsd.org>
From: None <apb@cequrux.com>
List: netbsd-bugs
Date: 10/01/2000 05:39:33
>Number:         11109
>Category:       kern
>Synopsis:       ETHER_MAX_LEN needs to increase for VLANs
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 01 05:45:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Alan Barrett
>Release:        NetBSD-current 2000-09-29
>Organization:
Not much
>Environment:
Any
>Description:
sys/net/if_ether.h defines ETHER_MAX_LEN as 1518, and this is used in
several places for error checking and for computing buffer sizes.

However, in the presence of 802.1Q VLAN tags, ethernet frames are
allowed to be up to 1522 bytes.  The extra 4 bytes are used for the VLAN
tag header, and are not allowed to be used with non-VLAN frames.

>How-To-Repeat:
	Code inspection.
>Fix:
It might be sufficient to simply bump ETHER_MAX_LEN up to 1522, and have
ether_{input,output}() enforce the rule that a non-VLAN frame may not
use the extra 4 bytes.
>Release-Note:
>Audit-Trail:
>Unformatted: