NetworkManager/SOURCES/1000-dhcp-nettools-search-domains-fix-rh1783981.patch
2021-10-08 14:01:37 +00:00

37 lines
1.1 KiB
Diff

From 43922e1ffa2442486afe60bdca3f91fe619d5980 Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Tue, 17 Dec 2019 14:23:33 +0100
Subject: [PATCH 1/1] 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
(cherry picked from commit 9aa00a8a14cb64f851234d025498ff2f9ec18e94)
(cherry picked from commit ea22135384edaf57a41293bd517ff1445b8c88a8)
---
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 e557c0048750..a537ee8272bc 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;
--
2.23.0