Bug 237642 - anaconda disables IPv6 globally.
anaconda disables IPv6 globally.
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Cantrell
: Reopened
Depends On:
Blocks: FC7Blocker
  Show dependency treegraph
Reported: 2007-04-24 08:48 EDT by David Woodhouse
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-04-26 08:45:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Woodhouse 2007-04-24 08:48:35 EDT
When I brought up my network interface to do a network install, I left IPv6
enabled. The machine picked up an address by RA, as usual.

When I later was asked to configure the network, I didn't pay attention -- I
just left it as it was. I assume that should have left IPv6 enabled. I suspect
it didn't though.

When I rebooted, I found that the IPv6 module wasn't loaded, and 'modprobe ipv6'
didn't work. After a while I found that anaconda had written 'install ipv6
/bin/true' to a file in /etc/modprobe.d.

I used system-config-network and re-enabled IPv6 on the eth0 interface, but
anaconda's file still exists. If anaconda wants to disable IPv6 (which should be
unnecessary), then it should do so by writing NETWORKING_IPV6=no to
/etc/sysconfig/network. It certainly shouldn't do that by default, but only if
the user ticks a 'globally disable IPv6' box in configuration somewhere.
Comment 1 David Woodhouse 2007-04-24 09:03:33 EDT
If you want the ipv6.ko module not to be loaded unless some interface is
configured to use IPv6, then file an initscripts RFE. Doing it in anaconda is
very wrong.
Comment 2 Jeremy Katz 2007-04-24 09:08:13 EDT
(In reply to comment #0)
> When I rebooted, I found that the IPv6 module wasn't loaded, and 'modprobe ipv6'
> didn't work. After a while I found that anaconda had written 'install ipv6
> /bin/true' to a file in /etc/modprobe.d.

This is thew new canonical and right way to do it; initscripts no longer has the

The rest certainly doesn't sound correct, though.
Comment 3 David Woodhouse 2007-04-24 09:35:17 EDT
(In reply to comment #2)
> This is thew new canonical and right way to do it; initscripts no longer has the

Hm. Still, it's rare that you should actually need to turn off IPv6 -- it should
need explicit action on the part of the user. Thinking back, I may have lied --
this install on my PS3 may have been from DVD rather than a network install. So
it might not have ignored my currently-running network configuration at the time
of the install; it might just have been that the default setup it offered me for
the eth0 interface had IPv6 disabled, and I didn't notice.

If the blacklist is the new way to do it, then system-config-network needs to
learn about that -- or preferably the initscripts should learn to create or
remove the blacklisting according to whether any of the ifcfg-$INTERFACE files
have IPv6 enabled. 

Better still, we could just disable the 'net-pf-10' autoloading which is
triggered by any application calling socket(AF_INET6,...), but still let
initscripts load 'ipv6' if it's found to be required by the configuration. No
need for the blacklisting of 'ipv6' at all.
Comment 4 David Cantrell 2007-04-24 13:33:21 EDT
I've patched anaconda so we only write out one disable-ipv6 file.  Stupid me on
the previous incarnation.

Leaving this in anaconda for now and closing rawhide.

Bill, if you want to work on changing how IPv6 is or is not disabled at boot
time in initscripts, let me know so I can keep anaconda in sync.
Comment 5 David Woodhouse 2007-04-24 13:36:33 EDT
Is anaconda now fixed so that it writes out _no_ disable-ipv6 files unless the
user takes explicit action to ask it to do so? 
Comment 6 David Cantrell 2007-04-24 14:20:36 EDT
Yes.  It's only written out if you disable IPv6 during installation.
Comment 7 David Woodhouse 2007-04-24 14:27:19 EDT
I most certainly wouldn't have disabled IPv6 during the installation. I might
have neglected to _enable_ it though, if anaconda didn't have it enabled by default.

It should default to being enabled -- does it? It's generally harmless even if
you're on a network which has only Legacy IP.
Comment 8 David Cantrell 2007-04-24 14:35:29 EDT
It is enabled by default in anaconda and has been ever since support for IPv6
during installation was added to rawhide.
Comment 9 David Woodhouse 2007-04-24 14:40:34 EDT
Hm, so you're telling me I actually went in and _unchecked_ a box asking about
IPv6 support, and then forgot about having done so?

I find that surprising, but have to admit that it's not altogether impossible.
I'll keep an eye out for this in future installs.
Comment 10 David Cantrell 2007-04-24 14:54:20 EDT
Yes, seriously, it's been enabled by default now for a _long time_.
Comment 11 David Woodhouse 2007-04-24 14:56:27 EDT
Fair enough. I know that's true when doing network installs. This was actually
the first install I've done from DVD for a very long time. I'll do it again and
make sure.
Comment 12 David Woodhouse 2007-04-24 19:54:32 EDT
You lie.

I did a clean install of f7-test4-f7-test4-20070420.0 on my PS3, from DVD. When
asked about network configuration I saw nothing about IPv6. I clicked on the
'Edit' button to look at eth0 configuration, and saw that IPv6 was enabled. I
clicked 'cancel' to close that dialog box without changing anything.

I now see that ifcfg-eth0 doesn't have IPV6INIT=yes in it, and the
/etc/modprobe.d/disable-ipv6 hack has been added again.
Comment 13 David Woodhouse 2007-04-25 13:34:52 EDT
This global disabling of IPv6 is unnecessary -- and
initscripts/system-config-network aren't set up to handle it properly yet; in
particular nothing will _remove_ the blacklist file when IPv6 _is_ configured.

If the user sets IPv6 off for the interfaces visible at install time, that
doesn't necessarily mean that IPv6 should be globally disabled. I'd suggest
removing this blacklisting entirely, at least until the rest of the system can
cope with removing the thing for itself when appropriate. There's no _need_ for
the blacklisting anyway, in the common case.
Comment 14 David Woodhouse 2007-04-26 03:44:52 EDT
Someone pointed out that 'You lie' might be misinterpreted. If so, I apologise
-- it's meant in the same context as "oops, I lie!", and not as an implication
that you were deliberately misleading. But presumably I didn't need to explain
that, and I hope you're not now offended by that fact that I _did_ explain it.... :)

Anyway... it looks like there was some miscommunication about the initscripts
change. It seems that the initscripts change was made on the basis that
disabling IPv6 globally like that is a strange thing to do, which you'd only
ever need if you have a broken network environment -- perhaps a nameserver which
doesn't respond to AAAA lookups. Thus, it's not worth being a standard part of
network configuration in /etc/sysconfig/network any more. It's an esoteric thing
which users _can_ do manually if they need to.

Anaconda itself should have no need to add this blacklisting. If there is no
native IPv6 configured on the local interfaces (remember, anaconda doesn't even
have support for adding tunnels and setting up 6to4), that's no reason for
anaconda to globally blacklist IPv6. It's not clear why anaconda was setting
NETWORKING_IPV6=no before, but in practice that setting was having no effect --
which was, overall, the correct behaviour.

We removed NETWORKING_IPV6 from initscripts because it wasn't working, and
nobody should be using it. I think the correct response on the anaconda side is
to just stop setting it. Not to start blacklisting the IPv6 module instead.

The correct holistically-considered response to the question "what should
anaconda do instead of setting NETWORKING_IPV6=n?", is "nothing". I appreciate
you may have received a different response before, but then you might have
phrased the question differently too :)
Comment 15 David Cantrell 2007-04-26 08:45:52 EDT
Removed the /etc/modprobe.d/disable-ipv6 stuff from anaconda.  The whole reason
I put the NETWORKING_IPV6 stuff in there and then later the disable-ipv6 stuff
is because users still have (had) it in their mind that being able to completely
disable one network stack is (a) possible and (b) something they should care about.

Originally, after adding IPv6 support to anaconda (which is continuing to
evolve, btw, it's been very difficult to get support in there when we have, say,
no engineering requirements other than "Add IPv6 support to anaconda"), I had
nothing in there for NETWORKING_IPV6.  Users pointed out that if they chose
disable IPv6 during install, the ipv6 module was still loaded after rebooting
and it confused them.  They thought, "but I said to turn off IPv6."  At that
point I went hunting for a way to prevent that module from loading.  I found the
NETWORKING_IPV6 variable for the ifcfg files, which seemed flimsy but might be
enough to satisfy the users.  So I added that.

At any rate, there's the backstory from my side.  I removed the disable-ipv6
line.  Disabling IPv6 going forward means your ifcfg scripts lacks any IPv6
configuration settings, which is fine by me.

Closing as rawhide (finally! :)
Comment 16 David Woodhouse 2007-04-26 09:14:15 EDT
Thanks for the background... and the fix.

If you ever need anything IPv6-related, please don't hesitate to ask. Is your
test network connected to our internal site-local IPv6 network?

Users would be right to believe that disabling IPv6 is possible. But wrong, in
general, to believe that it's something that they should care about. And if they
_do_ find that disabling IPv6 globally fixes some problem then a bug report
should be filed -- either against Fedora or a ticket with their network provider.

Note You need to log in before you can comment on or make changes to this bug.