diff options
author | Mike Gilbert <floppym@gentoo.org> | 2019-07-10 14:14:37 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2019-07-10 14:20:54 -0400 |
commit | 6be3d97505de9b79544a76fb998993886a40a9a4 (patch) | |
tree | e58447d0a924f1fb67beaba9cd4295758012492c /sys-apps/systemd | |
parent | virtual/opencl: updates for amdgpu and i965 providers (diff) | |
download | gentoo-6be3d97505de9b79544a76fb998993886a40a9a4.tar.gz gentoo-6be3d97505de9b79544a76fb998993886a40a9a4.tar.bz2 gentoo-6be3d97505de9b79544a76fb998993886a40a9a4.zip |
sys-apps/systemd: backport networkd fix
Closes: https://bugs.gentoo.org/687340
Package-Manager: Portage-2.3.68, Repoman-2.3.16_p2
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-apps/systemd')
-rw-r--r-- | sys-apps/systemd/files/242-network-domains.patch | 57 | ||||
-rw-r--r-- | sys-apps/systemd/systemd-242-r6.ebuild (renamed from sys-apps/systemd/systemd-242-r5.ebuild) | 1 |
2 files changed, 58 insertions, 0 deletions
diff --git a/sys-apps/systemd/files/242-network-domains.patch b/sys-apps/systemd/files/242-network-domains.patch new file mode 100644 index 000000000000..166a8ee5b76f --- /dev/null +++ b/sys-apps/systemd/files/242-network-domains.patch @@ -0,0 +1,57 @@ +From fe0e16db093a7da09fcb52a2bc7017197047443d Mon Sep 17 00:00:00 2001 +From: Yu Watanabe <watanabe.yu+github@gmail.com> +Date: Mon, 13 May 2019 05:40:31 +0900 +Subject: [PATCH] network: do not use ordered_set_printf() for DOMAINS= or + ROUTE_DOMAINS= + +This partially reverts 5e2a51d588dde4b52c6017ea80b75c16e6e23431. + +Fixes #12531. +--- + src/network/networkd-link.c | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c +index f8ee48802cb..1dc10c65a1b 100644 +--- a/src/network/networkd-link.c ++++ b/src/network/networkd-link.c +@@ -3495,12 +3495,11 @@ int link_save(Link *link) { + admin_state, oper_state); + + if (link->network) { +- bool space; ++ char **dhcp6_domains = NULL, **dhcp_domains = NULL; ++ const char *dhcp_domainname = NULL, *p; + sd_dhcp6_lease *dhcp6_lease = NULL; +- const char *dhcp_domainname = NULL; +- char **dhcp6_domains = NULL; +- char **dhcp_domains = NULL; + unsigned j; ++ bool space; + + fprintf(f, "REQUIRED_FOR_ONLINE=%s\n", + yes_no(link->network->required_for_online)); +@@ -3617,7 +3616,10 @@ int link_save(Link *link) { + (void) sd_dhcp6_lease_get_domains(dhcp6_lease, &dhcp6_domains); + } + +- ordered_set_print(f, "DOMAINS=", link->network->search_domains); ++ fputs("DOMAINS=", f); ++ space = false; ++ ORDERED_SET_FOREACH(p, link->network->search_domains, i) ++ fputs_with_space(f, p, NULL, &space); + + if (link->network->dhcp_use_domains == DHCP_USE_DOMAINS_YES) { + NDiscDNSSL *dd; +@@ -3635,7 +3637,10 @@ int link_save(Link *link) { + + fputc('\n', f); + +- ordered_set_print(f, "ROUTE_DOMAINS=", link->network->route_domains); ++ fputs("ROUTE_DOMAINS=", f); ++ space = false; ++ ORDERED_SET_FOREACH(p, link->network->route_domains, i) ++ fputs_with_space(f, p, NULL, &space); + + if (link->network->dhcp_use_domains == DHCP_USE_DOMAINS_ROUTE) { + NDiscDNSSL *dd; diff --git a/sys-apps/systemd/systemd-242-r5.ebuild b/sys-apps/systemd/systemd-242-r6.ebuild index ec26fa49f505..a42f1f1f5d8e 100644 --- a/sys-apps/systemd/systemd-242-r5.ebuild +++ b/sys-apps/systemd/systemd-242-r6.ebuild @@ -173,6 +173,7 @@ src_prepare() { "${FILESDIR}"/242-file-max.patch "${FILESDIR}"/242-rdrand-ryzen.patch "${FILESDIR}"/242-networkd-ipv6-token.patch + "${FILESDIR}"/242-network-domains.patch ) if ! use vanilla; then |