summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-07-31 10:41:40 +0200
committerThomas Haller <thaller@redhat.com>2020-08-05 12:47:55 +0200
commitf1ccd9fe71d42a3d55bc26fb5aa034623d8747cb (patch)
tree21bfc299edc397ed22557ed1e0567d9bad739ed3 /src
parent5da502a1e1bc8473686c2f20ff0ddbf268609c03 (diff)
dhcp/nettools: don't use systemd header "hostname-util.h" in "nm-dhcp-nettools.c"
We must not use systemd API directly, except via the adapter headers that expose a subset of the API. In this case, we already have our own implementation. Use it.
Diffstat (limited to 'src')
-rw-r--r--src/dhcp/nm-dhcp-nettools.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/dhcp/nm-dhcp-nettools.c b/src/dhcp/nm-dhcp-nettools.c
index a8127236c7..8d7d021710 100644
--- a/src/dhcp/nm-dhcp-nettools.c
+++ b/src/dhcp/nm-dhcp-nettools.c
@@ -14,7 +14,6 @@
#include <net/if_arp.h>
#include "nm-sd-adapt-shared.h"
-#include "hostname-util.h"
#include "nm-glib-aux/nm-dedup-multi.h"
#include "nm-std-aux/unaligned.h"
@@ -747,7 +746,7 @@ lease_parse_hostname (NDhcp4ClientLease *lease,
str = g_string_new_len ((char *)data, n_data);
- if (is_localhost(str->str))
+ if (nm_utils_is_localhost (str->str))
return;
nm_dhcp_option_add_option (options,
@@ -778,7 +777,7 @@ lease_parse_domainname (NDhcp4ClientLease *lease,
nm_gstring_prepare (&str);
for (char **d = domains; *d; d++) {
- if (is_localhost(*d))
+ if (nm_utils_is_localhost (*d))
return;
g_string_append (nm_gstring_add_space_delimiter (str), *d);