Re: [PATCH net V2 2/2] macvtap: signal truncated packets

2013-12-10 Thread Jason Wang
On 12/10/2013 11:29 PM, Michael S. Tsirkin wrote: > On Tue, Dec 10, 2013 at 01:49:46PM +0800, Jason Wang wrote: >> > macvtap_put_user() never return a value grater than iov length, this in >> > fact >> > bypasses the truncated checking in macvtap_recvmsg(). Fix this by always >> > returning the

Re: [PATCH net V2 2/2] macvtap: signal truncated packets

2013-12-10 Thread Michael S. Tsirkin
On Tue, Dec 10, 2013 at 01:49:46PM +0800, Jason Wang wrote: > macvtap_put_user() never return a value grater than iov length, this in fact > bypasses the truncated checking in macvtap_recvmsg(). Fix this by always > returning the size of packet plus the possible vlan header to let the trunca >

Re: [PATCH net V2 2/2] macvtap: signal truncated packets

2013-12-10 Thread Jason Wang
On 12/10/2013 11:29 PM, Michael S. Tsirkin wrote: On Tue, Dec 10, 2013 at 01:49:46PM +0800, Jason Wang wrote: macvtap_put_user() never return a value grater than iov length, this in fact bypasses the truncated checking in macvtap_recvmsg(). Fix this by always returning the size of packet

Re: [PATCH net V2 2/2] macvtap: signal truncated packets

2013-12-10 Thread Michael S. Tsirkin
On Tue, Dec 10, 2013 at 01:49:46PM +0800, Jason Wang wrote: macvtap_put_user() never return a value grater than iov length, this in fact bypasses the truncated checking in macvtap_recvmsg(). Fix this by always returning the size of packet plus the possible vlan header to let the trunca

[PATCH net V2 2/2] macvtap: signal truncated packets

2013-12-09 Thread Jason Wang
macvtap_put_user() never return a value grater than iov length, this in fact bypasses the truncated checking in macvtap_recvmsg(). Fix this by always returning the size of packet plus the possible vlan header to let the trunca checking work. Cc: Vlad Yasevich Cc: Zhi Yong Wu Cc: Michael S.

[PATCH net V2 2/2] macvtap: signal truncated packets

2013-12-09 Thread Jason Wang
macvtap_put_user() never return a value grater than iov length, this in fact bypasses the truncated checking in macvtap_recvmsg(). Fix this by always returning the size of packet plus the possible vlan header to let the trunca checking work. Cc: Vlad Yasevich vyasev...@gmail.com Cc: Zhi Yong Wu