[Resolvconf-devel] Bug#676804: resolvconf fails when network-manager brings up a statically-configured interface

Johannes Kloos jkloos at unix-ag.uni-kl.de
Sat Jun 9 14:01:53 UTC 2012


Package: resolvconf
Version: 1.66
Severity: important

Hi,

after the latest update, resolvconf and network-manager will not play
well with each other anymore. With all scripts as is, the post-ifup
script of resolvconf is called by network-manager, but fails to add a
resolv.conf entry for the appropriate interface.
Further digging reveals that NetworkManager sends ADDRFAM to
NetworkManager (cf. my modifications in 000resolvconf below) instead of
inet or inet6.
Since this behaviour first occured due to a resolvconf update, I'm
reporting it here; feel free to re-assign to network-manager if more
appropriate.

Best regards,
Johannes

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages resolvconf depends on:
ii  debconf [debconf-2.0]  1.5.43
ii  initscripts            2.88dsf-27
ii  lsb-base               4.1+Debian6

resolvconf recommends no packages.

resolvconf suggests no packages.

-- Configuration Files:
/etc/dhcp3/dhclient-enter-hooks.d/resolvconf changed:
logger -t DHCP "Entering resolvconf hook"
if [ -x /sbin/resolvconf ] ; then
	# Do stuff now
	case "$reason" in
		EXPIRE|FAIL|RELEASE|STOP)   # and TIMEOUT too ??
			# Delete resolv.conf info 
			[ ! "$interface" ] || /sbin/resolvconf -d "$interface"
			;;
	esac
	# For safety, undefine the nasty default make_resolv_conf()
	make_resolv_conf() {
		true
	}
	# Define a resolvconf-compatible m_r_c() function which gets run later
	# (or, in the TIMEOUT case, MAY get run later)
	case "$reason" in
		BOUND|RENEW|REBIND|REBOOT|TIMEOUT)
			logger -t DHCP "Redefining make_resolv_conf"
			make_resolv_conf() {
				R=""
				if [ "$new_domain_name_servers" ] && [ "$new_domain_name" ] ; then
					R="${R}domain $new_domain_name
"
				fi
				if [ "$new_domain_name_servers" ] && [ "$new_domain_search" ] ; then
					# The replacement below works around a bug with dhclient 3.1.0 which
					# separates items with the four characters backslash-zero-three-two
					# instead of with a space
					R="${R}search ${new_domain_search//\\032/ }
"
				fi
				for nameserver in $new_domain_name_servers ; do
					R="${R}nameserver $nameserver
"
				done
				logger -t DHCP "resolvconf calle for interface registration, nameservers: $R"
				[ ! "$interface" ] || echo -n "$R" | /sbin/resolvconf -a "$interface"
			}
			;;
	esac
fi

/etc/network/if-up.d/000resolvconf changed:
[ -x /sbin/resolvconf ] || exit 0
logger -t ifupdown "Called resolvconf hook, address family $ADDRFAM"
case "$ADDRFAM" in
  inet|inet6) : ;;
  NetworkManager) logger -t ifupdown "Called with adress family NetworkManager!?!?" ;;
  *) exit 0 ;;
esac
R=""
if [ "$IF_DNS_DOMAIN" ] ; then
	R="${R}domain $IF_DNS_DOMAIN
"
fi
if [ "$IF_DNS_SEARCH" ] ; then
	R="${R}search $IF_DNS_SEARCH
"
fi
if [ "$IF_DNS_SORTLIST" ] ; then
	R="${R}sortlist $IF_DNS_SORTLIST
"
fi
for NS in $IF_DNS_NAMESERVERS ; do
	R="${R}nameserver $NS
"
done
logger -t ifupdown "Settings nameservers for ${IFACE}.${ADDRFAM}: $R"
echo -n "$R" | /sbin/resolvconf -a "${IFACE}.${ADDRFAM}" || :


-- debconf information:
  resolvconf/linkify-resolvconf: true
  resolvconf/reboot-recommended-after-removal:
  resolvconf/downup-interfaces:
  resolvconf/link-tail-to-original: false





More information about the Resolvconf-devel mailing list