Print tun device on STARTED and STOPPED too
This commit is contained in:
10
src/main.c
10
src/main.c
@@ -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)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user