From: Guus Sliepen Date: Sun, 15 Jul 2012 23:09:47 +0000 (+0200) Subject: Give an error message when tincctl info cannot parse the given subnet or address. X-Git-Tag: release-1.1pre3~105 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=74646a4afa6557a0363cc85e0a95d578d4ab0ac2;p=oweals%2Ftinc.git Give an error message when tincctl info cannot parse the given subnet or address. --- diff --git a/src/info.c b/src/info.c index d0764da..f354f96 100644 --- a/src/info.c +++ b/src/info.c @@ -164,8 +164,10 @@ static int info_node(int fd, const char *item) { static int info_subnet(int fd, const char *item) { subnet_t subnet, find; - if(!str2net(&find, item)) + if(!str2net(&find, item)) { + fprintf(stderr, "Could not parse subnet or address '%s'.\n", item); return 1; + } bool address = !strchr(item, '/'); bool weight = strchr(item, '#');