[Bug 1853669] Re: systemd resolves own hostname to link local ipv6 address
Dan Streetman
ddstreet at canonical.com
Wed Dec 11 13:10:53 UTC 2019
> Ok, so adding it to /etc/resolv.conf is actually one of the supported
ways.
well, I wouldn't call it 'supported' as you're then responsible for
managing the resolv.conf file, but it will bypass resolved completely
(assuming you don't put 127.0.0.53 in the file, and you only use your
upstream nameserver(s)).
The normal glibc getaddrinfo() that uses the resolv.conf entries to find
nameserver(s) to query is of course supported no matter what you have in
the resolv.conf file, but that rarely has bugs.
> try connecting to that address:
>
> avl at fpc:~$ telnet fe80::4687:fcff:fe9e:4ac7 22
> Trying fe80::4687:fcff:fe9e:4ac7...
> telnet: Unable to connect to remote host: Invalid argument
you want to telnet to your local host?
anyway, Ubuntu isn't the right place to take this up - you should open
an upstream bug to systemd if this is an issue for you.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1853669
Title:
systemd resolves own hostname to link local ipv6 address
Status in systemd package in Ubuntu:
Incomplete
Bug description:
I've got an ethernet-device that only has a configured ipv4 address,
and some auto-generated link-local (aka "scope link") ipv6 address.
Any tool doing a DNS query (and /lib/systemd/systemd-resolved is the
DNS-server listening on 127.0.0.53) for this host's hostname gets back
two addresses: the correct ipv4 address, and a broken ipv6 address.
Unlike on ipv4, it is possible for the same ipv6-address to be
assigned to multiple devices, and therefore the address is only valid
in the context of the eth-device.
Now, if "ifconfig" shows "inet6 fe80::4687:fcff:fe9e:4ac7 prefixlen 64 scopeid 0x20<link>"
then "fe80::4687:fcff:fe9e:4ac7" is NOT a connectable address, and syscall connect() typically fails with EINVAL.
To make it a valid address, it needs to be suffixed with a "%" and the device name, like:
fe80::4687:fcff:fe9e:4ac7%enp4s0
Either the resolver can return the link name attached to the address
separated with a "%" char, or it needs to ignore link-local inet6
addresses.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1853669/+subscriptions
More information about the foundations-bugs
mailing list