/[pkg-src]/trunk/systemd/patches/systemd-242-network-do-not-use-ordered_set_printf-for-DOMAINS-or-ROUTE_DOMAINS.patch |
Contents of /trunk/systemd/patches/systemd-242-network-do-not-use-ordered_set_printf-for-DOMAINS-or-ROUTE_DOMAINS.patch
Parent Directory | Revision Log
Revision 3368 -
(show annotations)
(download)
Tue Jul 9 11:20:22 2019 UTC (5 years, 2 months ago) by niro
File size: 2373 byte(s)
Tue Jul 9 11:20:22 2019 UTC (5 years, 2 months ago) by niro
File size: 2373 byte(s)
-added systemd-242 upstream patches
1 | From fe0e16db093a7da09fcb52a2bc7017197047443d Mon Sep 17 00:00:00 2001 |
2 | From: Yu Watanabe <watanabe.yu+github@gmail.com> |
3 | Date: Mon, 13 May 2019 05:40:31 +0900 |
4 | Subject: [PATCH] network: do not use ordered_set_printf() for DOMAINS= or |
5 | ROUTE_DOMAINS= |
6 | |
7 | This partially reverts 5e2a51d588dde4b52c6017ea80b75c16e6e23431. |
8 | |
9 | Fixes #12531. |
10 | --- |
11 | src/network/networkd-link.c | 17 +++++++++++------ |
12 | 1 file changed, 11 insertions(+), 6 deletions(-) |
13 | |
14 | diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c |
15 | index f8ee48802cb..1dc10c65a1b 100644 |
16 | --- a/src/network/networkd-link.c |
17 | +++ b/src/network/networkd-link.c |
18 | @@ -3495,12 +3495,11 @@ int link_save(Link *link) { |
19 | admin_state, oper_state); |
20 | |
21 | if (link->network) { |
22 | - bool space; |
23 | + char **dhcp6_domains = NULL, **dhcp_domains = NULL; |
24 | + const char *dhcp_domainname = NULL, *p; |
25 | sd_dhcp6_lease *dhcp6_lease = NULL; |
26 | - const char *dhcp_domainname = NULL; |
27 | - char **dhcp6_domains = NULL; |
28 | - char **dhcp_domains = NULL; |
29 | unsigned j; |
30 | + bool space; |
31 | |
32 | fprintf(f, "REQUIRED_FOR_ONLINE=%s\n", |
33 | yes_no(link->network->required_for_online)); |
34 | @@ -3617,7 +3616,10 @@ int link_save(Link *link) { |
35 | (void) sd_dhcp6_lease_get_domains(dhcp6_lease, &dhcp6_domains); |
36 | } |
37 | |
38 | - ordered_set_print(f, "DOMAINS=", link->network->search_domains); |
39 | + fputs("DOMAINS=", f); |
40 | + space = false; |
41 | + ORDERED_SET_FOREACH(p, link->network->search_domains, i) |
42 | + fputs_with_space(f, p, NULL, &space); |
43 | |
44 | if (link->network->dhcp_use_domains == DHCP_USE_DOMAINS_YES) { |
45 | NDiscDNSSL *dd; |
46 | @@ -3635,7 +3637,10 @@ int link_save(Link *link) { |
47 | |
48 | fputc('\n', f); |
49 | |
50 | - ordered_set_print(f, "ROUTE_DOMAINS=", link->network->route_domains); |
51 | + fputs("ROUTE_DOMAINS=", f); |
52 | + space = false; |
53 | + ORDERED_SET_FOREACH(p, link->network->route_domains, i) |
54 | + fputs_with_space(f, p, NULL, &space); |
55 | |
56 | if (link->network->dhcp_use_domains == DHCP_USE_DOMAINS_ROUTE) { |
57 | NDiscDNSSL *dd; |