diff --git a/src/mustach-dhcpd-pools.c b/src/mustach-dhcpd-pools.c index d8096e2..fe06fce 100644 --- a/src/mustach-dhcpd-pools.c +++ b/src/mustach-dhcpd-pools.c @@ -80,8 +80,8 @@ static int must_put_range(void *closure, const char *name, int escape return 0; } if (!strcmp(name, "range")) { - fprintf(file, "%s - %s", ntop_ipaddr(&e->range_p->first_ip), - ntop_ipaddr(&e->range_p->last_ip)); + fprintf(file, "%s - ", ntop_ipaddr(&e->range_p->first_ip)); + fprintf(file, "%s", ntop_ipaddr(&e->range_p->last_ip)); return 0; } if (!strcmp(name, "first_ip")) { diff --git a/tests/expected/mustach b/tests/expected/mustach index f2bd27b..4599887 100644 --- a/tests/expected/mustach +++ b/tests/expected/mustach @@ -1,6 +1,6 @@ Subnets: location: example1 - range: 10.1.0.1 - 10.1.0.1 + range: 10.1.0.1 - 10.1.0.20 first_ip: 10.1.0.1 last_ip: 10.1.0.20 used: 10 @@ -15,7 +15,7 @@ Subnets: status: 0 location: example2 - range: 10.2.0.1 - 10.2.0.1 + range: 10.2.0.1 - 10.2.0.20 first_ip: 10.2.0.1 last_ip: 10.2.0.20 used: 8 @@ -30,7 +30,7 @@ Subnets: status: 0 location: example2 - range: 10.3.0.1 - 10.3.0.1 + range: 10.3.0.1 - 10.3.0.20 first_ip: 10.3.0.1 last_ip: 10.3.0.20 used: 9 @@ -45,7 +45,7 @@ Subnets: status: 0 location: All networks - range: 10.4.0.1 - 10.4.0.1 + range: 10.4.0.1 - 10.4.0.20 first_ip: 10.4.0.1 last_ip: 10.4.0.20 used: 5 @@ -102,7 +102,7 @@ Summary: --- skip ok --- Subnets: location: example1 - range: 10.1.0.1 - 10.1.0.1 + range: 10.1.0.1 - 10.1.0.20 first_ip: 10.1.0.1 last_ip: 10.1.0.20 used: 10 @@ -117,7 +117,7 @@ Subnets: status: 1 location: example2 - range: 10.3.0.1 - 10.3.0.1 + range: 10.3.0.1 - 10.3.0.20 first_ip: 10.3.0.1 last_ip: 10.3.0.20 used: 9