tun: fix carrier on/off status
authorMichael S. Tsirkin <[email protected]>
Mon, 28 Jan 2013 00:38:02 +0000 (00:38 +0000)
committerDavid S. Miller <[email protected]>
Tue, 29 Jan 2013 20:43:03 +0000 (15:43 -0500)
commitaf668b3c276d0f958a3aa46ef8ec47e2d5d333b3
tree68525f9d6ee11d9c1a9033001a4e106c7cb44071
parent604dfd6efc9b79bce432f2394791708d8e8f6efc
tun: fix carrier on/off status

Commit c8d68e6be1c3b242f1c598595830890b65cea64a removed carrier off call
from tun_detach since it's now called on queue disable and not only on
tun close.  This confuses userspace which used this flag to detect a
free tun. To fix, put this back but under if (clean).

Signed-off-by: Michael S. Tsirkin <[email protected]>
Tested-by: Jason Wang <[email protected]>
Acked-by: Jason Wang <[email protected]>
Tested-by: Toralf Förster <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/tun.c