Give an error message when tincctl info cannot parse the given subnet or address.

This commit is contained in:
Guus Sliepen 2012-07-16 01:09:47 +02:00
parent 53735a9d96
commit 74646a4afa

View file

@ -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, '#');