diff --git a/src/main.c b/src/main.c index acb49c4..8c6a8a3 100644 --- a/src/main.c +++ b/src/main.c @@ -362,12 +362,14 @@ int main (int argc, char **argv) if (mud_is_up(mud)) { if (!started) { - state("STARTED", NULL); + state("STARTED", tun_name); started = 1; } - } else if (started) { - state("STOPPED", NULL); - started = 0; + } else { + if (started) { + state("STOPPED", tun_name); + started = 0; + } } if (FD_ISSET(tun_fd, &rfds)) {