X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Ftincctl.c;h=56179c6ec19d3576246463c54493b80220cd2c3f;hp=4982e6b25fe3fb2f6773e5b24c8afb98d0a2a30f;hb=1065879c8c6e8cdf8d3755024241f31eaabd4138;hpb=6eaefb4dbce240334e35f67d9f3db5d4f44e49c9 diff --git a/src/tincctl.c b/src/tincctl.c index 4982e6b2..56179c6e 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -89,6 +89,7 @@ static void usage(bool status) { " subnets - all known subnets in the VPN\n" " connections - all meta connections with ourself\n" " graph - graph of the VPN in dotty format\n" + " purge Purge unreachable nodes\n" "\n")); printf(_("Report bugs to tinc@tinc-vpn.org.\n")); } @@ -578,6 +579,10 @@ int main(int argc, char *argv[], char *envp[]) { return 1; } + if(!strcasecmp(argv[optind], "purge")) { + return send_ctl_request_cooked(fd, REQ_PURGE, NULL, 0) != -1; + } + fprintf(stderr, _("Unknown command `%s'.\n"), argv[optind]); usage(true);