Commit 925b484
committed
No fallback nameservers for internal resolver
The internal resolver now uses any namesever found in the host's
/etc/resolv.conf as an external nameserver, and it's accessed
from the host's network namespace.
Before this change, when no external nameservers were found (so
the host had no entries in /etc/resolv.conf) Google's DNS servers
were used as fallbacks, always accessed from the container's
network namespace. If a container's initial set of endpoints had
IPv6 enabled, the IPv6 nameservers were included.
Now we have IPv6-only networks, a similar exception would be
needed for Google's IPv4 nameservers... don't include them if
there are no IPv4 endpoints.
However, only the initial set of endpoints was considered. As
networks are connected/disconnected, IPv4 or IPv6 connectivity
may be lost.
Unlike nameservers read from the host's /etc/resolv.conf, there
is no way to tell which fallback nameservers (v4/v6) might work
from the host's namespace. So, using the host's namespace isn't
a good solution.
Since we want to get away from using fallback nameservers anyway,
this change removes them.
If a host has no /etc/resolv.conf entries, but a container does
need to use DNS, it'll need to be configured with servers via
'--dns'.
Signed-off-by: Rob Murray <[email protected]>1 parent d297674 commit 925b484
12 files changed
Lines changed: 5 additions & 136 deletions
File tree
- libnetwork
- internal/resolvconf
- testdata/TestRCTransformForIntNS
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | 248 | | |
250 | 249 | | |
251 | 250 | | |
| |||
265 | 264 | | |
266 | 265 | | |
267 | 266 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | 267 | | |
279 | 268 | | |
280 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
344 | 343 | | |
345 | 344 | | |
346 | 345 | | |
| |||
355 | 354 | | |
356 | 355 | | |
357 | 356 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | 357 | | |
369 | 358 | | |
370 | 359 | | |
| |||
373 | 362 | | |
374 | 363 | | |
375 | 364 | | |
376 | | - | |
377 | 365 | | |
378 | 366 | | |
379 | 367 | | |
380 | 368 | | |
381 | 369 | | |
382 | 370 | | |
383 | 371 | | |
384 | | - | |
385 | 372 | | |
386 | 373 | | |
387 | 374 | | |
388 | 375 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
| 376 | + | |
396 | 377 | | |
397 | | - | |
398 | 378 | | |
399 | 379 | | |
400 | 380 | | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
| 381 | + | |
411 | 382 | | |
412 | | - | |
413 | 383 | | |
414 | 384 | | |
415 | 385 | | |
416 | 386 | | |
417 | 387 | | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | 388 | | |
457 | 389 | | |
458 | 390 | | |
| |||
496 | 428 | | |
497 | 429 | | |
498 | 430 | | |
499 | | - | |
| 431 | + | |
500 | 432 | | |
501 | 433 | | |
502 | 434 | | |
| |||
559 | 491 | | |
560 | 492 | | |
561 | 493 | | |
562 | | - | |
| 494 | + | |
563 | 495 | | |
564 | 496 | | |
565 | 497 | | |
| |||
Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 0 additions & 6 deletions
This file was deleted.
0 commit comments