[cups-devel] CUPS-2.2.0 - cups does not recognize change in /etc/resolv.conf until CUPS restart [regression]Michael Sweet

msweet at apple.com
Tue Dec 20 07:28:17 PST 2016


CUPS doesn't do anything special for the resolver - sounds like a glibc regression.

> On Dec 20, 2016, at 7:48 AM, Zdenek Dohnal <zdohnal at redhat.com> wrote:
> 
> Hi,
> 
> I encountered this issue on Fedora 25 with CUPS-2.2.0, but it worked on
> RHEL 7 with CUPS-1.6.3. I have stopped and disabled Network Manager,
> network is controlled by systemd-networkd (enabled+started),
> systemd-resolved (enabled+started) is in charge of DNS. My configuration
> is this:
> 
> $ cat /etc/systemd/network/ens9.network
> [Match]
> Name=ens9
> 
> [Network]
> IPForward=no
> Address=fd3b:d910:cd43::3/64
> $
> 
> $ cat /etc/systemd/system/systemd-networkd.service.d/local.conf
> [Service]
> ExecStartPre=-/sbin/ip link set eth0 down
> ExecStartPre=-/sbin/ip addr flush dev eth0
> Restart=on-failure
> $
> 
> $ cat /etc/cups/cupsd.conf
> MaxLogSize 0
> LogLevel warn
> Listen localhost:631
> Listen /var/run/cups/cups.sock
> Listen [fd3b:d910:cd43::3]:631
> Browsing Off
> DefaultShared no
> WebInterface Yes
> DefaultEncryption Never
> HostNameLookups on
> <Location />
>  Order allow,deny
>  Allow from all
> </Location>
> <Policy default>
>  <Limit All>
>    Allow from All
>  </Limit>
> </Policy>
> $
> 
> $ cat /etc/systemd/system/cups.service.d/local.conf
> [Service]
> ExecStartPre=/bin/sleep 2
> LimitCORE=1073741824
> $
> 
> $ cat /etc/systemd/network/wired.network
> [Match]
> Name=eth0
> 
> [Network]
> IPForward=no
> DHCP=ipv4
> 
> [DHCP]
> UseHostname=true
> SendHostname=true
> $
> 
> And I created symlink /etc/resolv.conf, which is pointed to
> /run/systemd/resolve/resolv.conf:
> 
> $ ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
> 
> File /etc/resolv.conf contains:
> 
> nameserver 192.168.122.1
> 
> Then when I opened CUPS web interface and ran strace on cupsd process, I
> saw correct IP of nameserver in strace output:
> 
> connect(6, {sa_family=AF_INET, sin_port=htons(53),
> sin_addr=inet_addr("192.168.122.1")}, 16) = 0
> recvfrom(6,
> "\0019\205\200\0\1\0\1\0\0\0\0\16dnsmasq_server\0\0\1\0\1\300\f\0\1\0\1\0\0\0\0\0\4\300\250z\27",
> 1024, 0, {sa_family=AF_INET, sin_port=htons(53),
> sin_addr=inet_addr("192.168.122.1")}, [16]) = 48
> 
> , but when I changed nameserver in /etc/resolv.conf to, for example,
> 8.8.8.8, CUPS still worked with old nameserver until CUPS is restarted.
> This behavior works with CUPS-1.6.3, so was there any changes regarding
> using /etc/resolv.conf by CUPS? Or it is regression? Thank you in advance.
> 
> Best regards,
> 
> Zdenek
> 
> 
> _______________________________________________
> cups-devel mailing list
> cups-devel at cups.org
> https://lists.cups.org/mailman/listinfo/cups-devel

_________________________________________________________
Michael Sweet, Senior Printing System Engineer



More information about the cups-devel mailing list