From 9aa00a8a14cb64f851234d025498ff2f9ec18e94 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Tue, 17 Dec 2019 14:23:33 +0100 Subject: [PATCH] dhcp: nettools: fix parsing of search domains option 'first' was never modified and so the dot was never added. Fixes: 6adade6f21d5 ('dhcp: add nettools dhcp4 client') https://bugzilla.redhat.com/show_bug.cgi?id=1783981 --- src/dhcp/nm-dhcp-nettools.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dhcp/nm-dhcp-nettools.c b/src/dhcp/nm-dhcp-nettools.c index 654bdf5031..8fd2852b41 100644 --- a/src/dhcp/nm-dhcp-nettools.c +++ b/src/dhcp/nm-dhcp-nettools.c @@ -246,10 +246,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;