Bug 7854

Summary: UML tuntap driver cuts VLAN frames.
Product: Platform Specific/Hardware Reporter: Paolo 'Blaisorblade' Giarrusso (blaisorblade)
Component: UMLAssignee: Jeff Dike (jdike)
Status: CLOSED CODE_FIX    
Severity: normal CC: alan, devzero
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.27 Subsystem:
Regression: No Bisected commit-id:

Description Paolo 'Blaisorblade' Giarrusso 2007-01-19 15:57:32 UTC
Bug originally reported here:
http://marc.theaimsgroup.com/?l=user-mode-linux-user&m=116430742111716&w=2

VLAN frames are longer, but UML ethernet drivers do not support this (i.e. they
were not written with this in mind, if it worked it would be purely by accident).
I've found at least a bug.

Quoting from my own answer:

this code in 
tuntap_read (arch/um/os-Linux/drivers/tuntap_kern.c) does (if you are using 
TUNTAP, as you seem to be doing):

static int tuntap_read(int fd, struct sk_buff **skb,
                       struct uml_net_private *lp)
{
        *skb = ether_adjust_skb(*skb, ETH_HEADER_OTHER);
        if(*skb == NULL) return(-ENOMEM);
        return(net_read(fd, (*skb)->mac.raw,
                        (*skb)->dev->mtu + ETH_HEADER_OTHER));
}

The last line is a read for MTU + 14 bytes, and is surely buggy for a VLAN 
setup. If you are a C programmer and can add + 4 to that size (obtaining 
<....> + ETH_HEADER_OTHER + 4), can you test whether with this change the 
described problem disappears?
Comment 1 Roland Kletzing 2008-05-11 12:41:38 UTC
some in-depth discussion at http://marc.info/?l=user-mode-linux-devel&m=101990155831279&w=2

not sure if this is a solution