Description of problem: getent returning ipv6 value in a ipv4 setup. $ grep ^hosts: /etc/nsswitch.conf hosts: files dns myhostname $ getent hosts localhost ::1 localhost $ dig +short localhost 127.0.0.1 $ getent hosts $(hostname) ::1 wb.home.test $ dig +short $(hostname) 192.168.0.132 avahi is disabled $ systemctl status avahi-daemon | grep -i active Active: inactive (dead) $ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.0.1 0.0.0.0 UG 10 0 0 enp3s0 192.168.0.0 0.0.0.0 255.255.255.0 U 10 0 0 enp3s0 Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. getent hosts localhost 2. getent hosts $(hostname) Reproducible: Steps to Reproduce:
that's by upstream design (and have been for a very long time). if an ipv6 address is available, it will always return it, if not it will return an ipv4 one. you need to completely block out ipv6 init if you want to enforce ipv4
CC: (none) => tmb
(In reply to Thomas Backlund from comment #1) > that's by upstream design (and have been for a very long time). > > if an ipv6 address is available, it will always return it, if not it will > return an ipv4 one. Well guessing that is causing my cups service problems in a default out of the box setup. > you need to completely block out ipv6 init if you want to enforce ipv4 Any idea what systemd service/trigger I need to disable/mask?
(In reply to Bit Twister from comment #2) > (In reply to Thomas Backlund from comment #1) > > that's by upstream design (and have been for a very long time). > > > > if an ipv6 address is available, it will always return it, if not it will > > return an ipv4 one. > > Well guessing that is causing my cups service problems in a default out of > the box setup. > Why ? ::1 matches localhost, so it's available... > > you need to completely block out ipv6 init if you want to enforce ipv4 > > Any idea what systemd service/trigger I need to disable/mask? Not an systemd thing... it's lower level... you need to block ipv6 module from loading / initializing... Something like: echo "alias net-pf-10 off" >> /etc/modprobe.d/disable-ipv6.conf echo "blacklist ipv6" >>/etc/modprobe.d/disable-ipv6.conf echo "options ipv6 disable=1" >>/etc/modprobe.d/disable-ipv6.conf and reboot. The first line blocks auto-loading The second line blocks alias loading The third line ensures it stays disabled even if someone / something force loads the ipv6 module.
(In reply to Thomas Backlund from comment #3) > (In reply to Bit Twister from comment #2) > > (In reply to Thomas Backlund from comment #1) > > > that's by upstream design (and have been for a very long time). > > > > > > if an ipv6 address is available, it will always return it, if not it will > > > return an ipv4 one. > > > > Well guessing that is causing my cups service problems in a default out of > > the box setup. > > > > Why ? ::1 matches localhost, so it's available... It may be but default cups /etc/cups/cupsd.conf Listen directive is Listen *:631 which will cause an Jan 24 12:12:58 wb.home.test cupsd[23936]: Unable to open listen socket for address [v1.::]:631 - Address family not supported by protocol. error, which will cause unable to open socket problem when I turn the printer on.
Sounds like a CUPS bug then.
(In reply to David Walser from comment #5) > Sounds like a CUPS bug then. I would not think so. If ipv6 is disabled during install, then getent should not be returning something like $ getent hosts $(hostname) ::1 wb.home.test instead of $ dig +short $(hostname) 192.168.0.132
Whiteboard: (none) => MGA5TOO
(In reply to Thomas Backlund from comment #3) > Not an systemd thing... it's lower level... you need to block ipv6 module > from loading / initializing... Was still getting applications running ipv6 connections before modprobe commands gained control or my /etc/sysctl.d/ ipv6 disables. Workaround is add ipv6.disable=1 to kernel boot arguments.
Summary: 5b2: getent returning ipv6 value in a ipv4 setup. => 6_s1: getent returning ipv6 value in a ipv4 setup.
Assignee: bugsquad => basesystem
Status comment: (none) => 6_s2Summary: 6_s1: getent returning ipv6 value in a ipv4 setup. => getent returning ipv6 value in a ipv4 setup.Source RPM: glibc-2.20-14.mga5.src.rpm => glibc-2.22-21.mga6.src.rpm
Keywords: (none) => 6sta2Status comment: 6_s2 => (none)
(In reply to Bit Twister from comment #6) > (In reply to David Walser from comment #5) > > Sounds like a CUPS bug then. > > I would not think so. If ipv6 is disabled during install, then getent should > not be returning something like What do you mean by disabled?
CC: (none) => pterjan
(In reply to Pascal Terjan from comment #8) > > I would not think so. If ipv6 is disabled during install, then getent should > > not be returning something like > > What do you mean by disabled? $ cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-desktop root=LABEL=cauldron noiswmd ipv6.disable=1 audit=0 vga=795 $ grep ipv6 /etc/sysctl.d/xx__sysctl.conf # disable all ipv6 # http://ask.xmodulo.com/disable-ipv6-linux.html net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 $ grep -v ^# /etc/modprobe.d/20_xx__custom.conf | sort | uniq alias net-pf-10 off blacklist firewire-core blacklist ipv6 blacklist thunderbolt options ipv6 disable=1
You say it was disabled during install, did all of this get written by the install?
(In reply to Pascal Terjan from comment #10) > You say it was disabled during install, did all of this get written > by the install? No. I would add ipv6.disable=1 on clean installs in boot setup. The rest after install, or would be there on upgrades.
CC: (none) => cooker
Source RPM: glibc-2.22-21.mga6.src.rpm => glibc-2.22-24.mga6.src.rpm
Whiteboard: MGA5TOO => (none)Source RPM: glibc-2.22-24.mga6.src.rpm => glibc-2.28-7.mga7.src.rpm