/etc/dhcp/dhclient-enter-hooks.d/resolved should not run in non-root network namespaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
isc-dhcp (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Running dhclient in a (non-root) network namespace on a system with systemd enabled fails because the hook installed by the systemd package updates the DNS configuration of the core/root namespace, instead of simply the /etc/resolv.conf file of that particular network namespace.
("ip netns add <name>" nicely links /etc/resolv.conf in that namespace to /etc/netns/
The following patch ensures that this script no longer misbehaves for this scenario:
--- /etc/dhcp/
+++ /etc/dhcp/
@@ -14,7 +14,7 @@
# (D) = master script downs interface
# (-) = master script does nothing with this
-if [ -x /lib/systemd/
+if [ -x /lib/systemd/
# For safety, first undefine the nasty default make_resolv_conf()
case "$reason" in
tags: | added: resolved-resolvconf |
Gah, the -n should of course be a -z.