tun: fix carrier on/off status
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 28 Jan 2013 00:38:02 +0000 (00:38 +0000)
committerDavid S. Miller <davem@davemloft.net>
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 <mst@redhat.com>
Tested-by: Jason Wang <jasowang@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Tested-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c