summary refs log tree commit diff
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-12-16 15:05:01 +0200
committerDavid S. Miller <davem@davemloft.net>2014-12-16 11:19:41 -0500
commit5eea84f478537de769330079dc068414f9d417f4 (patch)
treee41a7f8c33e87894ce9cd99a46388766d8db331e /drivers/net/tun.c
parent39ec7de7092ba9789f211d112a66bd19d4cb5d36 (diff)
downloadlinux-5eea84f478537de769330079dc068414f9d417f4.tar.gz
if_tun: add TUNSETVNETLE/TUNGETVNETLE
ifreq flags field is only 16 bit wide, so setting IFF_VNET_LE there has
no effect:
doesn't fit in two bytes.

The tests passed apparently because they have an even number of bugs,
all cancelling out.

Luckily we didn't release a kernel with this flag, so it's
not too late to fix this.

Add TUNSETVNETLE/TUNGETVNETLE to really achieve the purpose
of IFF_VNET_LE.

This has an added benefit that if we ever want a BE flag,
we won't have to deal with weird configurations like
setting both LE and BE at the same time.

IFF_VNET_LE will be dropped in a follow-up patch.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tun.c')
0 files changed, 0 insertions, 0 deletions