mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 05:50:08 +01:00
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:
parent
5da502a1e1
commit
f1ccd9fe71
1 changed files with 2 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue