ifup will fail if IPv6 has been compiled in the kernel

Bug #158582 reported by Martin André
38
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Hardy by Malte S. Stretz
Nominated for Intrepid by Malte S. Stretz

Bug Description

Binary package hint: ifupdown

ifup assumes that IPv6 has been built as a module and will fail bringing up the interfaces otherwise. It tries to insert ipv6 module with modprobe before configuring the interface with ifconfig and fails when IPv6 support has been build in the kernel, ie not in module.

We should try to insert ipv6 module only if there is no IPv6 capability, for example with a check in /proc.

Tags: ipv6
Revision history for this message
Larry (larry-salibra) wrote :

Are there any known workarounds?
I tried replacing modprobe with an empty shell script that does nothing but exit with no error with no luck.

Revision history for this message
Malte S. Stretz (mss) wrote :

This also affects OpenVZ, cf.
  http://forum.openvz.org/index.php?t=msg&goto=25378

Seems like this was b0rked in 0.6.8ubuntu3:
  https://launchpad.net/ubuntu/+source/ifupdown/0.6.8ubuntu3
which refers to bug #7091:
  https://bugs.launchpad.net/ubuntu/+bug/7091

I'll try to cook up a patch for this...

Revision history for this message
Malte S. Stretz (mss) wrote :

ugh. No idea what language the ifupdown sources are written in. I guess the following patch might help, I subscribed fabbione to this bug, he commited the original patch.

diff -u ifupdown-0.6.8ubuntu8.orig/ifupdown.nw ifupdown-0.6.8ubuntu8/ifupdown.nw
--- ifupdown-0.6.8ubuntu8.orig/ifupdown.nw 2007-09-20 00:45:09.000000000 +0200
+++ ifupdown-0.6.8ubuntu8/ifupdown.nw 2008-03-28 00:37:59.000000000 +0100
@@ -4127,7 +4127,7 @@
                                  /address/ is dependent on this choice.
     mtu size -- MTU size
   up
- modprobe -Q ipv6
+ modprobe -Q ipv6 || true
     ifconfig %iface% [[media %media%]] [[hw %hwaddress%]] [[mtu %mtu%]] up
     ifconfig %iface% add %address%/%netmask%
     [[ route -A inet6 add ::/0 gw %gateway% %iface% ]]

Revision history for this message
Matt LaPlante (cybrmatt) wrote :

+1
This appears to be making my Linode sad. :(

Revision history for this message
Matt LaPlante (cybrmatt) wrote :

@Malte: The patch seems to break debuild for me; one of the tests is failing. Does it work for you?

Revision history for this message
Malte S. Stretz (mss) wrote :

@Matt: I haven't actually tried it, the ifupdown source looks like gobbeldygook to me, I just put a command which *should* fix it where it would do. That will work only if ifupdown.nw understand shell syntax of course, no idea if thats the case.

I had the problem on a vserver (which doesn't even have modutils installed because it can't load any modules anyway) and "fixed" it by symlinking modprobe to /bin/true; not usable for most people probably but works for me.

Somebody who actually knows ifupdown has to have a look at this. A fix which might work for you is just removing the modprobe line from ifupdown.nw.

Revision history for this message
Matt LaPlante (cybrmatt) wrote :

I researched this a bit more. It appears it's modprobe that is actually broken... modprobe -Q *should* work as intended here, but the modprobe source doesn't seem to implement the -Q flag in practice. I've opened bug 210891 to address this.

Changed in ifupdown:
status: New → Confirmed
Revision history for this message
Vertoskan (vertoskan-deactivatedaccount) wrote :

I completely confirm. I have the kernel with compiled IPv6 support and modules turned off. I spent two days of looking for a fix. I found the good and easy workaround on some forums.

# ln -s /bin/true /sbin/modprobe

Now everything works great. I hope that somebody patch source files of ifupdown so IPv6 support was checked.

Revision history for this message
Malte S. Stretz (mss) wrote :

Ah, this bug again. Here is a fixed patch which takes care of the test cases as well. If somebody could test it and poke the ifupdown maintainers to finally include it, I'd be happy.

Revision history for this message
Vertoskan (vertoskan-deactivatedaccount) wrote :

Well, is someone in general deals with this package? This bug report was added exactly one year ago and nobody officialy fix this. :/ Can somebody inform ifupdown attendants?

Revision history for this message
Derek Morr (derekmorr) wrote :

Malte - your patch seemed to work for me.

Revision history for this message
Matt LaPlante (cybrmatt) wrote :

debdiff attached

Revision history for this message
Malte S. Stretz (mss) wrote :

@Matt: If you try to take the credits for a patch you didn't originally create, you should at least create a complete patch: You forgot to apply the patch to inet6.defn. Oh, and maybe you should include a link to this bug in the changelog as it is done with the other entries.

Revision history for this message
Matt LaPlante (cybrmatt) wrote :

@Malte: I'm not really interested in who gets credit for the solution, I was simply trying to add a patch that could hopefully be merged as seamlessly as possible. I had actually intended to upload the fixed package to my ppa for testing, however I'm experiencing technical difficulties preventing me from doing so at the moment. As far as names are concerned, I can't gpg sign a patch/deb as you, so I'm more or less stuck with using my own name there.

I believe the change to inet6.defn in your version is technically incorrect. The file appears to be dynamically generated on build, so changes there are not necessary.

Linking to the bug is a good idea, however, thanks.

Revision history for this message
Matt LaPlante (cybrmatt) wrote :

New debdiff with modified ChangeLog.

Updated packages for intrepid are now available in my PPA for testing:

deb http://ppa.launchpad.net/cybrmatt/ubuntu intrepid main
ifupdown_0.6.8ubuntu12~ppa1_i386.deb

or

https://launchpad.net/%7Ecybrmatt/+archive/+files/ifupdown_0.6.8ubuntu12~ppa1_i386.deb
https://launchpad.net/%7Ecybrmatt/+archive/+files/ifupdown_0.6.8ubuntu12~ppa1_amd64.deb

Revision history for this message
Malte S. Stretz (mss) wrote :

@Matt: Sorry for the harsh words, was a bad day.

I'm not sure where the inet6.defn file is generated from, but it is included in the tarball so it should be patched as well.

Revision history for this message
Captain Chaos (launchpad-chaos) wrote :

Any progress on getting this fixed in hardy? Right now I can't configure my router with a static IPv4 and IPv6 address on the same interface using the interfaces file. I have to resort to a custom script to set the IPv6 address.

Emmet Hikory (persia)
tags: added: ipv6
Revision history for this message
Steve Langasek (vorlon) wrote :

This appears to be a duplicate of bug #107432, which was fixed in ifupdown 0.6.8ubuntu16. Changelog:

ifupdown (0.6.8ubuntu16) jaunty; urgency=low

  * modprobe failures for ipv6 are benign as the module is likely built-in.
    (LP: #107432)
  * modprobe -Q is now deprecated and going away, move to using -q.
  * modprobe for ipv6 should honour the blacklists.
  * update all generated files to match their source versions (*.defn,
    main.c).

Changed in ifupdown (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.