dhcp: nettools: fix parsing of search domains option

'first' was never modified and so the dot was never added.

Fixes: 6adade6f21 ('dhcp: add nettools dhcp4 client')

https://bugzilla.redhat.com/show_bug.cgi?id=1783981
(cherry picked from commit 9aa00a8a14)
(cherry picked from commit ea22135384)
This commit is contained in:
Beniamino Galvani 2019-12-17 14:23:33 +01:00
parent f200573a95
commit bfece9d4fc

View file

@ -266,10 +266,10 @@ lease_option_print_domain_name (GString *str, uint8_t *cache, size_t *n_cachep,
return TRUE;
}
if (!first) {
if (!first)
g_string_append_c(str, '.');
else
first = FALSE;
}
if (!lease_option_print_label (str, n_label, domainp, n_domainp))
return FALSE;