Re: [PATCH net,stable] tun: fix vlan packet truncation

2018-04-17 Thread Bjørn Mork
David Miller writes: > The VLAN business might be bogus, and needs to be removed. > > However, the pskb_trim() has to stay in some form. I think this is what > Jason is trying to say. > > The semantics of running a BPF program is that the program returns the > desired

Re: [PATCH net,stable] tun: fix vlan packet truncation

2018-04-17 Thread David Miller
From: Bjørn Mork Date: Tue, 17 Apr 2018 00:00:38 +0200 > diff --git a/drivers/net/tun.c b/drivers/net/tun.c > index 28583aa0c17d..01cf8e3d8edc 100644 > --- a/drivers/net/tun.c > +++ b/drivers/net/tun.c > @@ -1103,13 +1103,6 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb,

Re: [PATCH net,stable] tun: fix vlan packet truncation

2018-04-17 Thread Bjørn Mork
Jason Wang writes: > Good catch, Thanks. I guess I am "lucky" as I apparently use configs no one else are using, and therefore often experience breakage ;-) I have been using tagged interfaces over tap for an occasional virtual "lab" of kvm machines for years. It's a

Re: [PATCH net,stable] tun: fix vlan packet truncation

2018-04-16 Thread Jason Wang
On 2018年04月17日 06:00, Bjørn Mork wrote: Bogus trimming in tun_net_xmit() causes truncated vlan packets. skb->len is correct whether or not skb_vlan_tag_present() is true. There is no more reason to adjust the skb length on xmit in this driver than any other driver. tun_put_user() adds 4 bytes

[PATCH net,stable] tun: fix vlan packet truncation

2018-04-16 Thread Bjørn Mork
Bogus trimming in tun_net_xmit() causes truncated vlan packets. skb->len is correct whether or not skb_vlan_tag_present() is true. There is no more reason to adjust the skb length on xmit in this driver than any other driver. tun_put_user() adds 4 bytes to the total for tagged packets because it