Skip to content

systemd-resolved updates resolv.conf every time an IPv6 RA with RDNSS is received, even if the nameservers are unchanged #17577

Closed

Description

@andatche

systemd version the issue has been seen with

246.6-2

Used distribution

Debian 11 Bullseye

Linux kernel version used (uname -a)

Linux unida 5.9.0-1-amd64 #1 SMP Debian 5.9.1-1 (2020-10-17) x86_64 GNU/Linux

CPU architecture issue was seen on

amd64

Unexpected behaviour you saw

systemd-resolved rewrites /run/systemd/resolve/resolv.conf every time an IPv6 RA containing the RDNSS option is received, even if the nameservers are unchanged from the previous configuration.

This causes other process which watch resolv.conf (e.g. dnsmasq for CNI/podman or libvirt) to reload their configuration unnecessarily, spamming the journal.

Nov 11 22:08:23 unida dnsmasq[1131]: reading /etc/resolv.conf
Nov 11 22:08:23 unida dnsmasq[1131]: using only locally-known addresses for domain dns.podman
Nov 11 22:08:23 unida dnsmasq[1131]: using nameserver <snip>#53
Nov 11 22:08:23 unida dnsmasq[1131]: using nameserver <snip>#53
Nov 11 22:08:23 unida dnsmasq[1131]: reading /etc/resolv.conf
Nov 11 22:08:23 unida dnsmasq[1131]: using only locally-known addresses for domain dns.podman
Nov 11 22:08:23 unida dnsmasq[1131]: using nameserver <snip>#53
Nov 11 22:08:23 unida dnsmasq[1131]: using nameserver <snip>#53
Nov 11 22:16:29 unida dnsmasq[1131]: reading /etc/resolv.conf
Nov 11 22:16:29 unida dnsmasq[1131]: using only locally-known addresses for domain dns.podman
Nov 11 22:16:29 unida dnsmasq[1131]: using nameserver <snip>#53
Nov 11 22:16:29 unida dnsmasq[1131]: using nameserver <snip>#53
Nov 11 22:16:29 unida dnsmasq[1131]: reading /etc/resolv.conf
Nov 11 22:16:29 unida dnsmasq[1131]: using only locally-known addresses for domain dns.podman
Nov 11 22:16:29 unida dnsmasq[1131]: using nameserver <snip>#53
Nov 11 22:16:29 unida dnsmasq[1131]: using nameserver <snip>#53

Steps to reproduce the problem

Define a network unit with with IPv6AcceptRA=yes configured on an interface connected to a network segment with a router which issues IPv6 RAs with the RDNSS option set.

[Match]
Name=eno1

[Network]
IPv6AcceptRA=yes

[IPv6AcceptRA]
UseDNS=yes

Activity

  1. changed the title [-]systemd-resolved updates resolv.conf every time an IPv6 RA with RDNSS is received[/-] [+]systemd-resolved updates resolv.conf every time an IPv6 RA with RDNSS is received, even if the nameservers are unchanged[/+] on Nov 11, 2020
  2. assigned and unassigned on Nov 25, 2020
  3. yuwata commented on Nov 25, 2020

    @yuwata
    Member

    Fix in resolved side is proposed in #17535. I will work on networkd side after v247 is released.

  4. added a commit that references this issue on Dec 2, 2020
    f3e1f00
  5. added 2 commits that reference this issue on Jan 20, 2021
    f380965
    af66400
  6. samy-mahmoudi commented on Jun 29, 2021

    @samy-mahmoudi
  7. yuwata commented on Jun 29, 2021

    @yuwata
    Member

    @samy-mahmoudi This issue is fixed in v248. Here is the upstream bug tracker, so backporting the patches to v245 is out of scope. Please contact the downstream.

  8. samy-mahmoudi commented on Jul 2, 2021

    @samy-mahmoudi

    @samy-mahmoudi This issue is fixed in v248. Here is the upstream bug tracker, so backporting the patches to v245 is out of scope.

    I was indeed under the assumption that we were running a version of systemd that included the relevant fixes. Thanks for pointing this out.

    Please contact the downstream.

    Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions