Bug#840613: systemd-networkd 215-17+deb8u5 not honoring UseDomains or UseDomainName in DHCP-mode
Andreas Henriksson
andreas at fatal.se
Sat Dec 10 14:49:23 GMT 2016
Control: fixed -1 232-7
Hello bee GmbH | Pasqual Brettner,
I briefly looked into the issue you reported and my findings are
found as inline comments below...
On Thu, Oct 13, 2016 at 11:13:55AM +0200, bee GmbH | Pasqual Brettner wrote:
> Package: systemd
> Version: 215-17+deb8u5
>
> Dear Maintainer,
>
> when i configure systemd-networkd to use DHCP, systemd-resolved does
> not write domain or search line into its /run/systemd/resolve/resolv.conf.
> The only thing in /run/systemd/resolve/resolv.conf is the banner to not touch the file
> and one line "nameserver <ip>".
[....]
> I also tried using UseDomains in [DHCP]-Section as found per google, but this seems to be
> not active in the version which is in the jessie repository. At least
> systemd reports an unknown lvalue UseDomains in section [DHCP].
> "/run/systemd/netif/leases/2" lists DOMAINNAME=my.domain.name as sent from
> my DHCP but i can't figure out, how to make systemd-networkd or systemd-resolved
> use it.
>
> I already looked into the source of systemd 215-17+deb8u5 and only found
> DHCPv4.UseDomainName
> DHCP.UseDomainName
These two are hooked up to the same 'dhcp_domainname' variable in
http://sources.debian.net/src/systemd/215-17%2Bdeb8u5/src/network/networkd-network-gperf.gperf/?hl=49#L49
http://sources.debian.net/src/systemd/215-17%2Bdeb8u5/src/network/networkd-network-gperf.gperf/?hl=58#L58
Apart from initializing dhcp_domainname to True it doesn't seem to be
used at all anywhere else in the code in the Jessie version of systemd.
Atleast as far as I can tell it thus doesn't seem to have any affect.
http://sources.debian.net/src/systemd/215-17%2Bdeb8u5/src/network/networkd-network.c/#L91
In newer versions of systemd there's been multiple commits related to
this option (and others) though and likely everything you're asking
for is implemented in newer versions. I've been looking at 232-7 (which
is why I used that version in the control field at the top), but not
sure since exactly which version the implementation is good enough for
your usecase.
Since it's not as simple as finding and pointing at a specific commit
that's isolated to your issue I don't think backporting this feature
will be a trivial job.
>
>
> So my name resolution is not working when using systemd-networkd in DHCP mode.
> Any suggestions?
Please test to confirm your issue is fixed in Stretch and report back!
If you want to stay with Jessie in your deployment (for now) then I'd
suggest you test the systemd version in jessie-backports. Hopefully
version 230 already contains all the changes you're looking for.
See:
https://packages.debian.org/source/jessie-backports/systemd
>
> This is critical to our deployment :(
In that case, if you really want to use it you should probably consider
contracting someone to give you their professional help and time. ;)
>
> I am using Debian GNU/Linux 8.5 with linux-image-4.6.0-0.bpo.1-amd64 (4.6.3-1~bpo8+1)
>
Regards,
Andreas Henriksson
More information about the Pkg-systemd-maintainers
mailing list