Print tun device on STARTED and STOPPED too

This commit is contained in:
angt
2016-04-04 20:05:33 +00:00
parent a6adcefc25
commit 32069eb104

View File

@@ -362,12 +362,14 @@ int main (int argc, char **argv)
if (mud_is_up(mud)) { if (mud_is_up(mud)) {
if (!started) { if (!started) {
state("STARTED", NULL); state("STARTED", tun_name);
started = 1; started = 1;
} }
} else if (started) { } else {
state("STOPPED", NULL); if (started) {
started = 0; state("STOPPED", tun_name);
started = 0;
}
} }
if (FD_ISSET(tun_fd, &rfds)) { if (FD_ISSET(tun_fd, &rfds)) {