mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 07:47:00 +00:00
json output: bugfix: correct range specify only first ip
Reviewed-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Gilles Bouthenot <gilles.bouthenot@univ-fcomte.fr>
This commit is contained in:
parent
e9d196e816
commit
bc654bcc68
1 changed files with 3 additions and 1 deletions
|
|
@ -384,8 +384,10 @@ int output_json(void)
|
||||||
fprintf(outfile, "\"location\":\"\", ");
|
fprintf(outfile, "\"location\":\"\", ");
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(outfile, "\"range\":\"%s\", ",
|
fprintf(outfile, "\"range\":\"%s",
|
||||||
ntop_ipaddr(&range_p->first_ip));
|
ntop_ipaddr(&range_p->first_ip));
|
||||||
|
fprintf(outfile, " - %s\", ",
|
||||||
|
ntop_ipaddr(&range_p->last_ip));
|
||||||
fprintf(outfile, "\"defined\":%lu, ", range_size);
|
fprintf(outfile, "\"defined\":%lu, ", range_size);
|
||||||
fprintf(outfile, "\"used\":%lu, ", range_p->count);
|
fprintf(outfile, "\"used\":%lu, ", range_p->count);
|
||||||
fprintf(outfile, "\"free\":%lu ",
|
fprintf(outfile, "\"free\":%lu ",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue