[Bug 1853669] Re: systemd resolves own hostname to link local ipv6 address
Andreas L
avl.ramschbox at gmx.at
Wed Dec 4 10:45:52 UTC 2019
It was no "assumption", but an "observation".
$ nslookup $(hostname) # a blank name without any domain
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: xxx # my "$(hostname)"
Address: 192.168.0.1
Name: xxx
Address: fe80::4687:fcff:fe9e:4ac7
$ sudo fuser -n udp 53
53/udp: 22620
$ ps uww 22620
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
systemd+ 22620 0.0 0.0 52368 2220 ? Ss Nov29 1:50 /lib/systemd/systemd-resolved
$ dpkg -S /lib/systemd/systemd-resolved
systemd: /lib/systemd/systemd-resolved
$ dpkg -l systemd | cat # (no UUOC, but prevent dpkg from fitting output to terminal)
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-================-============-=================================
ii systemd 237-3ubuntu10.33 amd64 system and service manager
$
At which points does your output differ?
--
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