networkmanager: fix link-local ip addresses

NetworkManager needs an additional avahi-user to use link-local
IPv4 (and probably IPv6) addresses. avahi-autoipd also needs to be
patched to the right path.
This commit is contained in:
Profpatsch 2016-02-26 03:28:56 +01:00
parent edeb5480fc
commit 70c02402c8
3 changed files with 8 additions and 0 deletions

View file

@ -252,6 +252,7 @@
gammu-smsd = 228;
pdnsd = 229;
octoprint = 230;
avahi-autoipd = 231;
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!

View file

@ -228,6 +228,11 @@ in {
users.extraUsers = [{
name = "nm-openvpn";
uid = config.ids.uids.nm-openvpn;
}
{
# to enable link-local connections
name = "avahi-autoipd";
uid = config.ids.uids.avahi-autoipd;
}];
systemd.packages = cfg.packages;

View file

@ -20,6 +20,8 @@ stdenv.mkDerivation rec {
--replace /bin/sh ${stdenv.shell} \
--replace /usr/sbin/ethtool ${ethtool}/sbin/ethtool \
--replace /bin/sed ${gnused}/bin/sed
# to enable link-local connections
substituteInPlace src/devices/nm-device.c --replace '("avahi-autoipd", NULL, NULL)' '("avahi-autoipd", &"${avahi}/sbin/avahi-autoipd", NULL)'
configureFlags="$configureFlags --with-udev-dir=$out/lib/udev"
'';