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.
This commit is contained in:
Thomas Haller 2020-07-31 10:41:40 +02:00
parent 5da502a1e1
commit f1ccd9fe71
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -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);