macvtap: fix uninitialized access on TUNSETIFF
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 16 Dec 2014 13:04:56 +0000 (15:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Dec 2014 16:19:41 +0000 (11:19 -0500)
commit39ec7de7092ba9789f211d112a66bd19d4cb5d36
treedfa9725a4c54e900c9a60999f29b0f65b72f96fd
parentc286bbaf4f56958db2591146145e248c7b9021c5
macvtap: fix uninitialized access on TUNSETIFF

flags field in ifreq is only 16 bit wide, but
we read it as a 32 bit value.
If userspace doesn't zero-initialize unused fields,
this will lead to failures.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvtap.c