]> git.baikalelectronics.ru Git - kernel.git/commit
tun: honor IFF_UP in tun_get_user()
authorEric Dumazet <edumazet@google.com>
Wed, 16 Dec 2015 16:57:37 +0000 (08:57 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Dec 2015 20:25:57 +0000 (15:25 -0500)
commitddb5fdd4ce7efc8564e6f74326ea0107e27f43d3
tree04d86f96dfb815ffb3d0e2a7cc1e01bcd23b48af
parenta4db9068079e15d74e0f6399accbde26fb3b2b03
tun: honor IFF_UP in tun_get_user()

If a tun interface is turned down, we should not allow packet injection
into the kernel.

Kernel does not send packets to the tun already.

TUNATTACHFILTER can not be used as only tun_net_xmit() is taking care
of it.

Reported-by: Curt Wohlgemuth <curtw@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c