]> git.baikalelectronics.ru Git - kernel.git/commit
tun: set the flags before registering the netdevice
authorSabrina Dubroca <sd@queasysnail.net>
Tue, 10 Apr 2018 14:28:55 +0000 (16:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Apr 2018 18:48:05 +0000 (14:48 -0400)
commit2d6699c30509c04e68de5fea7bcb6bb6dfbb28f0
tree4fa9368ac79ecd4e3aac22df21d968d6cfd5d8a1
parent44561ee04bbac1ae60c0bbd2687cd26e54f8b6aa
tun: set the flags before registering the netdevice

Otherwise, register_netdevice advertises the creation of the device with
the default flags, instead of what the user requested.

Reported-by: Thomas Haller <thaller@redhat.com>
Fixes: f628d0a7ca2f ("tun: export flags, uid, gid, queue information over netlink")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c