Merge ~fourdollars/ubuntu/+source/systemd:ubuntu-bionic into ~ubuntu-core-dev/ubuntu/+source/systemd:ubuntu-bionic
- Git
- lp:~fourdollars/ubuntu/+source/systemd
- ubuntu-bionic
- Merge into ubuntu-bionic
Status: | Merged | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 2357ccbc6857323d5a006e94465ce0987f1bb58d | ||||||||||||||||||||
Proposed branch: | ~fourdollars/ubuntu/+source/systemd:ubuntu-bionic | ||||||||||||||||||||
Merge into: | ~ubuntu-core-dev/ubuntu/+source/systemd:ubuntu-bionic | ||||||||||||||||||||
Diff against target: |
432 lines (+392/-0) 6 files modified
debian/changelog (+33/-0) debian/patches/hwdb-revert-airplane-mode-keys-handling-on-Dell.patch (+33/-0) debian/patches/lp1668771-resolved-switch-cache-option-to-a-tri-state-option-s.patch (+229/-0) debian/patches/lp1833671-networkd-keep-bond-slave-up-if-already-attached.patch (+50/-0) debian/patches/lp1835581-src-network-networkd-dhcp4.c-set-prefsrc-for-classle.patch (+43/-0) debian/patches/series (+4/-0) |
||||||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Ancell (community) | Approve | ||
Shih-Yuan Lee (community) | Needs Resubmitting | ||
Dimitri John Ledkov | Pending | ||
Review via email: mp+370808@code.launchpad.net |
Commit message
Description of the change
Shih-Yuan Lee (fourdollars) wrote : | # |
Please help to review my patches again.
Robert Ancell (robert-ancell) wrote : | # |
This still has the following line in the changelog:
[ You-Sheng Yang ]
* d/p/Revert-
- udev: drop Revert-
The removing patch was for the already deprecated
"75-
and it's causing unnecessary problem when a system happends to NICs with
same MAC address, e.g. Dell's MAC address pass-thru. (LP: #1837700)
There is no Revert-
Shih-Yuan Lee (fourdollars) wrote : | # |
This merge proposal is going to remove debian/
Shih-Yuan Lee (fourdollars) wrote : | # |
I have revised the commit message and debian/changelog to the right path of d/p/d/Revert-
Robert Ancell (robert-ancell) wrote : | # |
OK, I see the file now but it's still listed in debian/
Shih-Yuan Lee (fourdollars) wrote : | # |
Revert-
Shih-Yuan Lee (fourdollars) wrote : | # |
Revert-
https:/
Robert Ancell (robert-ancell) wrote : | # |
After much discussion on IRC @fourdollars showed me how the change is there in the merge commit, which you can see using gitk. It was added to the git repository after the 237-3ubuntu10.24 release, but the 237-3ubuntu10.25 release was made without this change.
Preview Diff
1 | diff --git a/debian/changelog b/debian/changelog | |||
2 | index dd35b12..eaf374a 100644 | |||
3 | --- a/debian/changelog | |||
4 | +++ b/debian/changelog | |||
5 | @@ -1,3 +1,36 @@ | |||
6 | 1 | systemd (237-3ubuntu10.26) bionic; urgency=medium | ||
7 | 2 | |||
8 | 3 | [ You-Sheng Yang ] | ||
9 | 4 | * d/p/d/Revert-udev-network-device-renaming-immediately-give.patch: | ||
10 | 5 | - udev: drop Revert-udev-network-device-renaming-immediately-give.patch | ||
11 | 6 | The removing patch was for the already deprecated | ||
12 | 7 | "75-persistent-net-generator.rules" based interface renaming mechanism, | ||
13 | 8 | and it's causing unnecessary problem when a system happends to NICs with | ||
14 | 9 | same MAC address, e.g. Dell's MAC address pass-thru. (LP: #1837700) | ||
15 | 10 | |||
16 | 11 | [ Shih-Yuan Lee (FourDollars) ] | ||
17 | 12 | * d/p/hwdb-revert-airplane-mode-keys-handling-on-Dell.patch: | ||
18 | 13 | - hwdb: revert airplane mode keys handling on Dell | ||
19 | 14 | That reverts some commits those created double key events issues on some | ||
20 | 15 | Dell laptops. (LP: #1740894) | ||
21 | 16 | |||
22 | 17 | -- Shih-Yuan Lee (FourDollars) <sylee@canonical.com> Wed, 07 Aug 2019 17:56:02 +0800 | ||
23 | 18 | |||
24 | 19 | systemd (237-3ubuntu10.25) bionic; urgency=medium | ||
25 | 20 | |||
26 | 21 | [ Dan Streetman ] | ||
27 | 22 | * d/p/lp1835581-src-network-networkd-dhcp4.c-set-prefsrc-for-classle.patch: | ||
28 | 23 | - set src address for dhcp 'classless' routes (LP: #1835581) | ||
29 | 24 | * d/p/lp1833671-networkd-keep-bond-slave-up-if-already-attached.patch: | ||
30 | 25 | - keep bond slave up if already attached (LP: #1833671) | ||
31 | 26 | |||
32 | 27 | [ Jorge Niedbalski ] | ||
33 | 28 | * d/p/lp1668771-resolved-switch-cache-option-to-a-tri-state-option-s.patch: | ||
34 | 29 | Allows cache=no-negative option to be set, ignoring negative | ||
35 | 30 | answers to be cached (LP: #1668771). | ||
36 | 31 | |||
37 | 32 | -- Dan Streetman <ddstreet@canonical.com> Mon, 22 Jul 2019 12:45:02 -0400 | ||
38 | 33 | |||
39 | 1 | systemd (237-3ubuntu10.24) bionic; urgency=medium | 34 | systemd (237-3ubuntu10.24) bionic; urgency=medium |
40 | 2 | 35 | ||
41 | 3 | [Dimitri John Ledkov 🌈] | 36 | [Dimitri John Ledkov 🌈] |
42 | diff --git a/debian/patches/hwdb-revert-airplane-mode-keys-handling-on-Dell.patch b/debian/patches/hwdb-revert-airplane-mode-keys-handling-on-Dell.patch | |||
43 | 4 | new file mode 100644 | 37 | new file mode 100644 |
44 | index 0000000..b6cacd0 | |||
45 | --- /dev/null | |||
46 | +++ b/debian/patches/hwdb-revert-airplane-mode-keys-handling-on-Dell.patch | |||
47 | @@ -0,0 +1,33 @@ | |||
48 | 1 | From: seb128 <seb128@ubuntu.com> | ||
49 | 2 | Date: Fri, 9 Nov 2018 16:54:02 +0100 | ||
50 | 3 | Subject: hwdb: revert airplane mode keys handling on Dell | ||
51 | 4 | |||
52 | 5 | That reverts the commits #8762 and #9868, those created double key events issues on some Dell laptops. | ||
53 | 6 | --- | ||
54 | 7 | hwdb/60-keyboard.hwdb | 6 +++++- | ||
55 | 8 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
56 | 9 | |||
57 | 10 | diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb | ||
58 | 11 | index 262e772..c4f02e9 100644 | ||
59 | 12 | --- a/hwdb/60-keyboard.hwdb | ||
60 | 13 | +++ b/hwdb/60-keyboard.hwdb | ||
61 | 14 | @@ -263,7 +263,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pn* | ||
62 | 15 | KEYBOARD_KEY_85=brightnessdown # Fn+Down Brightness Down | ||
63 | 16 | KEYBOARD_KEY_86=brightnessup # Fn+Up Brightness Up | ||
64 | 17 | KEYBOARD_KEY_87=battery # Fn+F3 battery icon | ||
65 | 18 | - KEYBOARD_KEY_88=!wlan # Fn+(F2|PrtScr|Home) Turn On/Off Wireless | ||
66 | 19 | + KEYBOARD_KEY_88=unknown # Fn+F2 Turn On/Off Wireless - handled in hardware | ||
67 | 20 | KEYBOARD_KEY_89=ejectclosecd # Fn+F10 Eject CD | ||
68 | 21 | KEYBOARD_KEY_8a=suspend # Fn+F1 hibernate | ||
69 | 22 | KEYBOARD_KEY_8b=switchvideomode # Fn+F8 CRT/LCD (high keycode: "displaytoggle") | ||
70 | 23 | @@ -299,6 +299,10 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*2110:pvr* | ||
71 | 24 | KEYBOARD_KEY_85=unknown # Brightness Down, also emitted by acpi-video, ignore | ||
72 | 25 | KEYBOARD_KEY_86=unknown # Brightness Up, also emitted by acpi-video, ignore | ||
73 | 26 | |||
74 | 27 | +# Dell Inspiron 537* | ||
75 | 28 | +evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron537*:pvr* | ||
76 | 29 | + KEYBOARD_KEY_88=!wlan # Fn-PrtScr rfkill | ||
77 | 30 | + | ||
78 | 31 | # Latitude XT2 | ||
79 | 32 | evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*XT2:pvr* | ||
80 | 33 | KEYBOARD_KEY_9b=up # tablet rocker up | ||
81 | diff --git a/debian/patches/lp1668771-resolved-switch-cache-option-to-a-tri-state-option-s.patch b/debian/patches/lp1668771-resolved-switch-cache-option-to-a-tri-state-option-s.patch | |||
82 | 0 | new file mode 100644 | 34 | new file mode 100644 |
83 | index 0000000..a524410 | |||
84 | --- /dev/null | |||
85 | +++ b/debian/patches/lp1668771-resolved-switch-cache-option-to-a-tri-state-option-s.patch | |||
86 | @@ -0,0 +1,229 @@ | |||
87 | 1 | From b13ee6b829193bc9e58de7d56f3aeb9a57d0abf8 Mon Sep 17 00:00:00 2001 | ||
88 | 2 | From: Jorge Niedbalski <jnr@metaklass.org> | ||
89 | 3 | Bug: https://github.com/systemd/systemd/issues/5552 | ||
90 | 4 | Origin: upstream, https://github.com/systemd/systemd/pull/13047 | ||
91 | 5 | Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1668771 | ||
92 | 6 | Date: Fri, 12 Jul 2019 15:34:24 -0400 | ||
93 | 7 | Subject: [PATCH] resolved: switch cache option to a tri-state option | ||
94 | 8 | (systemd#5552). | ||
95 | 9 | |||
96 | 10 | Change the resolved.conf Cache option to a tri-state "no, no-negative, yes" values. | ||
97 | 11 | |||
98 | 12 | If a lookup returns SERVFAIL systemd-resolved will cache the result for 30s (See 201d995), | ||
99 | 13 | however, there are several use cases on which this condition is not acceptable (See systemd#5552 comments) | ||
100 | 14 | and the only workaround would be to disable cache entirely or flush it , which isn't optimal. | ||
101 | 15 | |||
102 | 16 | This change adds the 'no-negative' option when set it avoids putting in cache | ||
103 | 17 | negative answers but still works the same heuristics for positive answers. | ||
104 | 18 | |||
105 | 19 | Signed-off-by: Jorge Niedbalski <jnr@metaklass.org> | ||
106 | 20 | --- | ||
107 | 21 | man/resolved.conf.xml | 9 +++++---- | ||
108 | 22 | src/resolve/resolved-dns-cache.c | 8 ++++++++ | ||
109 | 23 | src/resolve/resolved-dns-cache.h | 3 ++- | ||
110 | 24 | src/resolve/resolved-dns-transaction.c | 3 ++- | ||
111 | 25 | src/resolve/resolved-gperf.gperf | 2 +- | ||
112 | 26 | src/resolve/resolved-manager.c | 2 +- | ||
113 | 27 | src/resolve/resolved-manager.h | 2 +- | ||
114 | 28 | src/resolve/resolved-mdns.c | 2 +- | ||
115 | 29 | src/shared/resolve-util.c | 9 +++++++++ | ||
116 | 30 | src/shared/resolve-util.h | 18 ++++++++++++++++++ | ||
117 | 31 | 10 files changed, 48 insertions(+), 10 deletions(-) | ||
118 | 32 | |||
119 | 33 | diff --git a/man/resolved.conf.xml b/man/resolved.conf.xml | ||
120 | 34 | index bf88c0e950..84e31616ed 100644 | ||
121 | 35 | --- a/man/resolved.conf.xml | ||
122 | 36 | +++ b/man/resolved.conf.xml | ||
123 | 37 | @@ -221,10 +221,11 @@ | ||
124 | 38 | |||
125 | 39 | <varlistentry> | ||
126 | 40 | <term><varname>Cache=</varname></term> | ||
127 | 41 | - <listitem><para>Takes a boolean argument. If "yes" (the default), resolving a domain name which already got | ||
128 | 42 | - queried earlier will return the previous result as long as it is still valid, and thus does not result in a new | ||
129 | 43 | - network request. Be aware that turning off caching comes at a performance penalty, which is particularly | ||
130 | 44 | - high when DNSSEC is used.</para> | ||
131 | 45 | + <listitem><para>Takes a boolean or <literal>no-negative</literal> as argument. If <literal>yes</literal> (the default), resolving a domain name | ||
132 | 46 | + which already got queried earlier will return the previous result as long as it is still valid, and thus does | ||
133 | 47 | + not result in a new network request. Be aware that turning off caching comes at a performance penalty, which | ||
134 | 48 | + is particularly high when DNSSEC is used.</para> | ||
135 | 49 | + If <literal>no-negative</literal>, only positive answers are cached. | ||
136 | 50 | |||
137 | 51 | <para>Note that caching is turned off implicitly if the configured DNS server is on a host-local IP address | ||
138 | 52 | (such as 127.0.0.1 or ::1), in order to avoid duplicate local caching.</para></listitem> | ||
139 | 53 | diff --git a/src/resolve/resolved-dns-cache.c b/src/resolve/resolved-dns-cache.c | ||
140 | 54 | index b653a20b6e..bd809fa5b1 100644 | ||
141 | 55 | --- a/src/resolve/resolved-dns-cache.c | ||
142 | 56 | +++ b/src/resolve/resolved-dns-cache.c | ||
143 | 57 | @@ -641,6 +641,7 @@ static bool rr_eligible(DnsResourceRecord *rr) { | ||
144 | 58 | |||
145 | 59 | int dns_cache_put( | ||
146 | 60 | DnsCache *c, | ||
147 | 61 | + DnsCacheMode cache_mode, | ||
148 | 62 | DnsResourceKey *key, | ||
149 | 63 | int rcode, | ||
150 | 64 | DnsAnswer *answer, | ||
151 | 65 | @@ -752,6 +753,13 @@ int dns_cache_put( | ||
152 | 66 | return 0; | ||
153 | 67 | } | ||
154 | 68 | |||
155 | 69 | + if (cache_mode == DNS_CACHE_MODE_NO_NEGATIVE) { | ||
156 | 70 | + char key_str[DNS_RESOURCE_KEY_STRING_MAX]; | ||
157 | 71 | + log_debug("Not caching negative entry for: %s, cache mode set to no-negative", | ||
158 | 72 | + dns_resource_key_to_string(key, key_str, sizeof key_str)); | ||
159 | 73 | + return 0; | ||
160 | 74 | + } | ||
161 | 75 | + | ||
162 | 76 | r = dns_cache_put_negative( | ||
163 | 77 | c, | ||
164 | 78 | key, | ||
165 | 79 | diff --git a/src/resolve/resolved-dns-cache.h b/src/resolve/resolved-dns-cache.h | ||
166 | 80 | index a5ace2c4c6..348bb62c50 100644 | ||
167 | 81 | --- a/src/resolve/resolved-dns-cache.h | ||
168 | 82 | +++ b/src/resolve/resolved-dns-cache.h | ||
169 | 83 | @@ -23,6 +23,7 @@ | ||
170 | 84 | #include "hashmap.h" | ||
171 | 85 | #include "list.h" | ||
172 | 86 | #include "prioq.h" | ||
173 | 87 | +#include "resolve-util.h" | ||
174 | 88 | #include "time-util.h" | ||
175 | 89 | |||
176 | 90 | typedef struct DnsCache { | ||
177 | 91 | @@ -40,7 +41,7 @@ typedef struct DnsCache { | ||
178 | 92 | void dns_cache_flush(DnsCache *c); | ||
179 | 93 | void dns_cache_prune(DnsCache *c); | ||
180 | 94 | |||
181 | 95 | -int dns_cache_put(DnsCache *c, DnsResourceKey *key, int rcode, DnsAnswer *answer, bool authenticated, uint32_t nsec_ttl, usec_t timestamp, int owner_family, const union in_addr_union *owner_address); | ||
182 | 96 | +int dns_cache_put(DnsCache *c, DnsCacheMode cache_mode, DnsResourceKey *key, int rcode, DnsAnswer *answer, bool authenticated, uint32_t nsec_ttl, usec_t timestamp, int owner_family, const union in_addr_union *owner_address); | ||
183 | 97 | int dns_cache_lookup(DnsCache *c, DnsResourceKey *key, bool clamp_ttl, int *rcode, DnsAnswer **answer, bool *authenticated); | ||
184 | 98 | |||
185 | 99 | int dns_cache_check_conflicts(DnsCache *cache, DnsResourceRecord *rr, int owner_family, const union in_addr_union *owner_address); | ||
186 | 100 | diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c | ||
187 | 101 | index f500ec20a0..eb0c0c8ce1 100644 | ||
188 | 102 | --- a/src/resolve/resolved-dns-transaction.c | ||
189 | 103 | +++ b/src/resolve/resolved-dns-transaction.c | ||
190 | 104 | @@ -614,7 +614,7 @@ static void dns_transaction_cache_answer(DnsTransaction *t) { | ||
191 | 105 | return; | ||
192 | 106 | |||
193 | 107 | /* Caching disabled? */ | ||
194 | 108 | - if (!t->scope->manager->enable_cache) | ||
195 | 109 | + if (t->scope->manager->enable_cache == DNS_CACHE_MODE_NO) | ||
196 | 110 | return; | ||
197 | 111 | |||
198 | 112 | /* We never cache if this packet is from the local host, under | ||
199 | 113 | @@ -625,6 +625,7 @@ static void dns_transaction_cache_answer(DnsTransaction *t) { | ||
200 | 114 | return; | ||
201 | 115 | |||
202 | 116 | dns_cache_put(&t->scope->cache, | ||
203 | 117 | + t->scope->manager->enable_cache, | ||
204 | 118 | t->key, | ||
205 | 119 | t->answer_rcode, | ||
206 | 120 | t->answer, | ||
207 | 121 | diff --git a/src/resolve/resolved-gperf.gperf b/src/resolve/resolved-gperf.gperf | ||
208 | 122 | index a5865ce6c2..a4a461823b 100644 | ||
209 | 123 | --- a/src/resolve/resolved-gperf.gperf | ||
210 | 124 | +++ b/src/resolve/resolved-gperf.gperf | ||
211 | 125 | @@ -23,5 +23,5 @@ Resolve.Domains, config_parse_search_domains, 0, | ||
212 | 126 | Resolve.LLMNR, config_parse_resolve_support, 0, offsetof(Manager, llmnr_support) | ||
213 | 127 | Resolve.MulticastDNS, config_parse_resolve_support, 0, offsetof(Manager, mdns_support) | ||
214 | 128 | Resolve.DNSSEC, config_parse_dnssec_mode, 0, offsetof(Manager, dnssec_mode) | ||
215 | 129 | -Resolve.Cache, config_parse_bool, 0, offsetof(Manager, enable_cache) | ||
216 | 130 | +Resolve.Cache, config_parse_dns_cache_mode, DNS_CACHE_MODE_YES, offsetof(Manager, enable_cache) | ||
217 | 131 | Resolve.DNSStubListener, config_parse_dns_stub_listener_mode, 0, offsetof(Manager, dns_stub_listener_mode) | ||
218 | 132 | diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c | ||
219 | 133 | index 12a9d17107..2c0dc707bb 100644 | ||
220 | 134 | --- a/src/resolve/resolved-manager.c | ||
221 | 135 | +++ b/src/resolve/resolved-manager.c | ||
222 | 136 | @@ -599,7 +599,7 @@ int manager_new(Manager **ret) { | ||
223 | 137 | m->llmnr_support = RESOLVE_SUPPORT_NO; | ||
224 | 138 | m->mdns_support = RESOLVE_SUPPORT_NO; | ||
225 | 139 | m->dnssec_mode = DEFAULT_DNSSEC_MODE; | ||
226 | 140 | - m->enable_cache = true; | ||
227 | 141 | + m->enable_cache = DNS_CACHE_MODE_YES; | ||
228 | 142 | m->dns_stub_listener_mode = DNS_STUB_LISTENER_YES; | ||
229 | 143 | m->read_resolv_conf = true; | ||
230 | 144 | m->need_builtin_fallbacks = true; | ||
231 | 145 | diff --git a/src/resolve/resolved-manager.h b/src/resolve/resolved-manager.h | ||
232 | 146 | index 5c1a6670ef..072072d2e3 100644 | ||
233 | 147 | --- a/src/resolve/resolved-manager.h | ||
234 | 148 | +++ b/src/resolve/resolved-manager.h | ||
235 | 149 | @@ -48,7 +48,7 @@ struct Manager { | ||
236 | 150 | ResolveSupport llmnr_support; | ||
237 | 151 | ResolveSupport mdns_support; | ||
238 | 152 | DnssecMode dnssec_mode; | ||
239 | 153 | - bool enable_cache; | ||
240 | 154 | + DnsCacheMode enable_cache; | ||
241 | 155 | DnsStubListenerMode dns_stub_listener_mode; | ||
242 | 156 | |||
243 | 157 | /* Network */ | ||
244 | 158 | diff --git a/src/resolve/resolved-mdns.c b/src/resolve/resolved-mdns.c | ||
245 | 159 | index 38e2c54227..1d7d3602ad 100644 | ||
246 | 160 | --- a/src/resolve/resolved-mdns.c | ||
247 | 161 | +++ b/src/resolve/resolved-mdns.c | ||
248 | 162 | @@ -351,7 +351,7 @@ static int on_mdns_packet(sd_event_source *s, int fd, uint32_t revents, void *us | ||
249 | 163 | dns_transaction_process_reply(t, p); | ||
250 | 164 | } | ||
251 | 165 | |||
252 | 166 | - dns_cache_put(&scope->cache, NULL, DNS_PACKET_RCODE(p), p->answer, false, (uint32_t) -1, 0, p->family, &p->sender); | ||
253 | 167 | + dns_cache_put(&scope->cache, scope->manager->enable_cache, NULL, DNS_PACKET_RCODE(p), p->answer, false, (uint32_t) -1, 0, p->family, &p->sender); | ||
254 | 168 | |||
255 | 169 | } else if (dns_packet_validate_query(p) > 0) { | ||
256 | 170 | log_debug("Got mDNS query packet for id %u", DNS_PACKET_ID(p)); | ||
257 | 171 | diff --git a/src/shared/resolve-util.c b/src/shared/resolve-util.c | ||
258 | 172 | index edcb8e05e7..90a4efcd1d 100644 | ||
259 | 173 | --- a/src/shared/resolve-util.c | ||
260 | 174 | +++ b/src/shared/resolve-util.c | ||
261 | 175 | @@ -38,3 +38,12 @@ static const char* const dnssec_mode_table[_DNSSEC_MODE_MAX] = { | ||
262 | 176 | [DNSSEC_YES] = "yes", | ||
263 | 177 | }; | ||
264 | 178 | DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(dnssec_mode, DnssecMode, DNSSEC_YES); | ||
265 | 179 | +DEFINE_CONFIG_PARSE_ENUM(config_parse_dns_cache_mode, dns_cache_mode, DnsCacheMode, "Failed to parse DNS cache mode setting") | ||
266 | 180 | + | ||
267 | 181 | +static const char* const dns_cache_mode_table[_DNS_CACHE_MODE_MAX] = { | ||
268 | 182 | + [DNS_CACHE_MODE_YES] = "yes", | ||
269 | 183 | + [DNS_CACHE_MODE_NO] = "no", | ||
270 | 184 | + [DNS_CACHE_MODE_NO_NEGATIVE] = "no-negative", | ||
271 | 185 | +}; | ||
272 | 186 | + | ||
273 | 187 | +DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(dns_cache_mode, DnsCacheMode, DNS_CACHE_MODE_YES); | ||
274 | 188 | diff --git a/src/shared/resolve-util.h b/src/shared/resolve-util.h | ||
275 | 189 | index 975156ca96..b235b97332 100644 | ||
276 | 190 | --- a/src/shared/resolve-util.h | ||
277 | 191 | +++ b/src/shared/resolve-util.h | ||
278 | 192 | @@ -22,6 +22,16 @@ | ||
279 | 193 | |||
280 | 194 | #include "macro.h" | ||
281 | 195 | |||
282 | 196 | +typedef enum DnsCacheMode DnsCacheMode; | ||
283 | 197 | + | ||
284 | 198 | +enum DnsCacheMode { | ||
285 | 199 | + DNS_CACHE_MODE_NO, | ||
286 | 200 | + DNS_CACHE_MODE_YES, | ||
287 | 201 | + DNS_CACHE_MODE_NO_NEGATIVE, | ||
288 | 202 | + _DNS_CACHE_MODE_MAX, | ||
289 | 203 | + _DNS_CACHE_MODE_INVALID = 1 | ||
290 | 204 | +}; | ||
291 | 205 | + | ||
292 | 206 | typedef enum ResolveSupport ResolveSupport; | ||
293 | 207 | typedef enum DnssecMode DnssecMode; | ||
294 | 208 | |||
295 | 209 | @@ -53,9 +63,17 @@ enum DnssecMode { | ||
296 | 210 | |||
297 | 211 | int config_parse_resolve_support(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); | ||
298 | 212 | int config_parse_dnssec_mode(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); | ||
299 | 213 | +int config_parse_dns_cache_mode(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); | ||
300 | 214 | + | ||
301 | 215 | +CONFIG_PARSER_PROTOTYPE(config_parse_resolve_support); | ||
302 | 216 | +CONFIG_PARSER_PROTOTYPE(config_parse_dnssec_mode); | ||
303 | 217 | +CONFIG_PARSER_PROTOTYPE(config_parse_dns_cache_mode); | ||
304 | 218 | |||
305 | 219 | const char* resolve_support_to_string(ResolveSupport p) _const_; | ||
306 | 220 | ResolveSupport resolve_support_from_string(const char *s) _pure_; | ||
307 | 221 | |||
308 | 222 | const char* dnssec_mode_to_string(DnssecMode p) _const_; | ||
309 | 223 | DnssecMode dnssec_mode_from_string(const char *s) _pure_; | ||
310 | 224 | + | ||
311 | 225 | +const char* dns_cache_mode_to_string(DnsCacheMode p) _const_; | ||
312 | 226 | +DnsCacheMode dns_cache_mode_from_string(const char *s) _pure_; | ||
313 | 227 | -- | ||
314 | 228 | 2.20.1 | ||
315 | 229 | |||
316 | diff --git a/debian/patches/lp1833671-networkd-keep-bond-slave-up-if-already-attached.patch b/debian/patches/lp1833671-networkd-keep-bond-slave-up-if-already-attached.patch | |||
317 | 0 | new file mode 100644 | 230 | new file mode 100644 |
318 | index 0000000..b1b9149 | |||
319 | --- /dev/null | |||
320 | +++ b/debian/patches/lp1833671-networkd-keep-bond-slave-up-if-already-attached.patch | |||
321 | @@ -0,0 +1,50 @@ | |||
322 | 1 | From cbff717048ad25b2fb47ea3df688f9df7e6af6c7 Mon Sep 17 00:00:00 2001 | ||
323 | 2 | From: Tobias Jungel <tobias.jungel@bisdn.de> | ||
324 | 3 | Origin: upstream, https://github.com/systemd/systemd/commit/cbff717048ad25b2fb47ea3df688f9df7e6af6c7 | ||
325 | 4 | Bug: https://github.com/systemd/systemd/issues/10118 | ||
326 | 5 | Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1833671 | ||
327 | 6 | Date: Fri, 19 Oct 2018 13:12:35 +0200 | ||
328 | 7 | Subject: [PATCH] networkd: keep bond slave up if already attached | ||
329 | 8 | |||
330 | 9 | There is no need to disable an already correct enslaved interface. | ||
331 | 10 | |||
332 | 11 | relates to #10118 | ||
333 | 12 | --- | ||
334 | 13 | src/network/networkd-link.c | 8 ++++++++ | ||
335 | 14 | src/network/networkd-link.h | 1 + | ||
336 | 15 | 2 files changed, 9 insertions(+) | ||
337 | 16 | |||
338 | 17 | --- a/src/network/networkd-link.c | ||
339 | 18 | +++ b/src/network/networkd-link.c | ||
340 | 19 | @@ -483,6 +483,10 @@ | ||
341 | 20 | return -ENOMEM; | ||
342 | 21 | } | ||
343 | 22 | |||
344 | 23 | + r = sd_netlink_message_read_u32(message, IFLA_MASTER, (uint32_t *)&link->master_ifindex); | ||
345 | 24 | + if (r < 0) | ||
346 | 25 | + log_link_debug_errno(link, r, "New device has no master, continuing without"); | ||
347 | 26 | + | ||
348 | 27 | r = sd_netlink_message_read_ether_addr(message, IFLA_ADDRESS, &link->mac); | ||
349 | 28 | if (r < 0) | ||
350 | 29 | log_link_debug_errno(link, r, "MAC address not found for new device, continuing without"); | ||
351 | 30 | @@ -2280,6 +2284,10 @@ | ||
352 | 31 | return link_joined(link); | ||
353 | 32 | |||
354 | 33 | if (link->network->bond) { | ||
355 | 34 | + if (link->network->bond->state == NETDEV_STATE_READY && | ||
356 | 35 | + link->network->bond->ifindex == link->master_ifindex) | ||
357 | 36 | + return link_joined(link); | ||
358 | 37 | + | ||
359 | 38 | log_struct(LOG_DEBUG, | ||
360 | 39 | LOG_LINK_INTERFACE(link), | ||
361 | 40 | LOG_NETDEV_INTERFACE(link->network->bond), | ||
362 | 41 | --- a/src/network/networkd-link.h | ||
363 | 42 | +++ b/src/network/networkd-link.h | ||
364 | 43 | @@ -67,6 +67,7 @@ | ||
365 | 44 | int n_ref; | ||
366 | 45 | |||
367 | 46 | int ifindex; | ||
368 | 47 | + int master_ifindex; | ||
369 | 48 | char *ifname; | ||
370 | 49 | char *kind; | ||
371 | 50 | unsigned short iftype; | ||
372 | diff --git a/debian/patches/lp1835581-src-network-networkd-dhcp4.c-set-prefsrc-for-classle.patch b/debian/patches/lp1835581-src-network-networkd-dhcp4.c-set-prefsrc-for-classle.patch | |||
373 | 0 | new file mode 100644 | 51 | new file mode 100644 |
374 | index 0000000..00f3af3 | |||
375 | --- /dev/null | |||
376 | +++ b/debian/patches/lp1835581-src-network-networkd-dhcp4.c-set-prefsrc-for-classle.patch | |||
377 | @@ -0,0 +1,43 @@ | |||
378 | 1 | From ac2dce5f36bb8b1a877ff765e6a4dfde6bfb2d49 Mon Sep 17 00:00:00 2001 | ||
379 | 2 | From: Dan Streetman <ddstreet@canonical.com> | ||
380 | 3 | Bug: https://github.com/systemd/systemd/issues/12969 | ||
381 | 4 | Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1835581 | ||
382 | 5 | Origin: upstream, https://github.com/systemd/systemd/commit/ac2dce5f36bb8b1a877ff765e6a4dfde6bfb2d49 | ||
383 | 6 | Date: Fri, 5 Jul 2019 16:42:38 -0400 | ||
384 | 7 | Subject: [PATCH] src/network/networkd-dhcp4.c: set prefsrc for classless or | ||
385 | 8 | static routes | ||
386 | 9 | |||
387 | 10 | When a DHCP server provides only a gateway, the networkd-dhcp4 code adds a | ||
388 | 11 | default route using that gateway, and sets the just-provided address as | ||
389 | 12 | the route's prefsrc; this was added in commit | ||
390 | 13 | 46b0c76e2c355c0d0cc4792abb98cde07b28bc53 | ||
391 | 14 | |||
392 | 15 | However, if the DHCP server has also provided classless route(s), these | ||
393 | 16 | are used instead of a default route using the provided gateway; the | ||
394 | 17 | networkd-dhcp4 code sets up the classless routes, but does not use the | ||
395 | 18 | just-provided dhcp address as the prefsrc of the route(s). Note that | ||
396 | 19 | it also doesn't set the prefsrc for static routes, though it should. | ||
397 | 20 | |||
398 | 21 | If the interface has only the dhcp-provided address, this is not usually | ||
399 | 22 | a problem, but if it has another address (e.g. a static address), then | ||
400 | 23 | traffic sent through the dhcp-provided gateway might not use the | ||
401 | 24 | dhcp-provided source address. If the gateway router only will route | ||
402 | 25 | traffic from the dhcp-provided address, then the dhcp client system's | ||
403 | 26 | networking through the router will not work. | ||
404 | 27 | |||
405 | 28 | Fixes: #12969 | ||
406 | 29 | --- | ||
407 | 30 | src/network/networkd-dhcp4.c | 4 ++++ | ||
408 | 31 | 1 file changed, 4 insertions(+) | ||
409 | 32 | |||
410 | 33 | --- a/src/network/networkd-dhcp4.c | ||
411 | 34 | +++ b/src/network/networkd-dhcp4.c | ||
412 | 35 | @@ -130,6 +130,8 @@ | ||
413 | 36 | route->priority = link->network->dhcp_route_metric; | ||
414 | 37 | route->table = table; | ||
415 | 38 | route->scope = route_scope_from_address(route, &address); | ||
416 | 39 | + if (IN_SET(route->scope, RT_SCOPE_LINK, RT_SCOPE_UNIVERSE)) | ||
417 | 40 | + route->prefsrc.in = address; | ||
418 | 41 | |||
419 | 42 | r = route_configure(route, link, dhcp4_route_handler); | ||
420 | 43 | if (r < 0) | ||
421 | diff --git a/debian/patches/series b/debian/patches/series | |||
422 | index 40073dd..afe70cd 100644 | |||
423 | --- a/debian/patches/series | |||
424 | +++ b/debian/patches/series | |||
425 | @@ -118,3 +118,7 @@ resolved-do-not-hit-CNAME-in-NODATA.patch | |||
426 | 118 | exec-util-in-execute_directories-support-initial-exec-env.patch | 118 | exec-util-in-execute_directories-support-initial-exec-env.patch |
427 | 119 | core-execute-environment_generators-with-manager-s-enviro.patch | 119 | core-execute-environment_generators-with-manager-s-enviro.patch |
428 | 120 | core-execute-generators-with-manager-s-environmnet.patch | 120 | core-execute-generators-with-manager-s-environmnet.patch |
429 | 121 | lp1835581-src-network-networkd-dhcp4.c-set-prefsrc-for-classle.patch | ||
430 | 122 | lp1668771-resolved-switch-cache-option-to-a-tri-state-option-s.patch | ||
431 | 123 | lp1833671-networkd-keep-bond-slave-up-if-already-attached.patch | ||
432 | 124 | hwdb-revert-airplane-mode-keys-handling-on-Dell.patch |
The changelog mentions "drop Revert- udev-network- device- renaming- immediately- give.patch" but this patch still seems to be enabled.
The changelog should be updated to explicitly mention "d/p/hwdb- revert- airplane- mode-keys- handling- on-Dell. patch" as it's not clear that's what the line is referring to.