Network manager handles teredo interface inappropriately

Bug #304958 reported by Toni Ruottu
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
miredo (Ubuntu)
Fix Released
Undecided
Rémi Denis-Courmont
network-manager (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: network-manager

Teredo interface sometimes disappears when I move from one wlan to another.
I think this is because network manager fails to communicate environmental changes to miredo.

Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

Might likewise be a bug in miredo.
In any case the co-operation of these two pieces should probably be analysed.

Revision history for this message
Peter Berry (pwberry) wrote :

I just noticed that the Teredo tunnel doesn't get brought up automatically when using wireless networking, perhaps because the network isn't available when the daemon starts. Restarting it manually (using the init script) makes the tunnel available. Miredo should somehow find out when the network comes up (maybe it can be told?) and bring the tunnel up then.

Changed in miredo:
assignee: nobody → rdenis
status: New → Confirmed
Revision history for this message
Chris Cowan (macil) wrote :

Miredo should restart whenever the networking interface comes up. The OpenSSH-server package does this by putting a script inside "/etc/network/if-up.d", and I believe doing the same thing for Miredo would make Miredo restart as needed automatically.

Revision history for this message
Chris Cowan (macil) wrote :

Here's a script which fixes the problem, by reloading miredo automatically whenever a network interface comes up. Just placing it inside /etc/network/if-up.d does the trick. I think it would be good to include this in the miredo package.
The script is based off of the script used by OpenSSH, with a small work-around added so it can work with a glitch in NetworkManager.

Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

Your script didn't seem to do the trick on my Jaunty. I don't have time for a closer look right now. I'll get back to it later.

Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

In further tests the script worked. There might be some other problems regarding jumpy network environments and miredo. In any case this script seems to be a major advancement in solving the bug. I suggest we get it in and close the bug for now. New bugs may be filed against further issues, if they still bother someone.

Now, where exactly should the script go? Should it be in original miredo source distribution? Does that already include similar scripts? Should it be sent to the Debian miredo package maintainer? Or is it simply something that Ubuntu motu should get into the Ubuntu package?

Revision history for this message
David Siegel (djsiegel-deactivatedaccount) wrote :

Thank you for bringing this bug to our attention. Unfortunately a paper cut should be a small usability issue that affects many people and is quick and easy to fix. I'm afraid this bug can't be addressed as part of this project.

Changed in hundredpapercuts:
status: New → Invalid
Revision history for this message
Rémi Denis-Courmont (rdenis) wrote :

/etc/network/if-up.d is a Debian invention. This could go to the Debian package, and cannot quite go to the upstream source.

However, I don't understand why the scripts reload miredo when an ipv6 interface is brought up?! Only IPv4 interfaces should really matter as regards Miredo's underlying connectivity... Am I missing something?

Changed in miredo (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Chris Cowan (macil) wrote :

Oh, I hadn't stopped to think that an IPv6 interface could trigger the reload script. (Could the interface that miredo brings up trigger it? Would that cause it to go down and up again? I'd assume not as my system has been pretty stable, but is still worrying.)

I've attached a new version of the script that does not reload miredo when it is an ipv6 interface coming up, which works fine.

Vish (vish)
affects: hundredpapercuts → null
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for taking the time to report this bug and helping to make Ubuntu better. Could you please open a terminal and execute: apport-collect 304958 ? It will attach the necessary information to this report. Also you can submit more information for it by looking to https://wiki.ubuntu.com/DebuggingNetworkManager , Thanks in advance.

Changed in network-manager (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Chris Cowan (macil) wrote :

Pedro: I don't think that would help. This bug is a problem with Miredo (missing automatic reloading when the network is changed) and is solved as far as I can tell by the script I've posted in post #9. NetworkManager is not at fault here.

This bug is set to expire soon, some action needs to be done. I think all that's left is to just integrate the script to the upstream debian package and get it to the ubuntu package too. Should a bug report be posted there along with a link to here and the script?

Revision history for this message
Peter Berry (pwberry) wrote :

Why is it even marked as incomplete? It's acknowledged as a problem and we know everything we need to know about it.

Changed in miredo (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Rémi Denis-Courmont (rdenis) wrote :

I put the change to the Debian package. Thanks

Changed in miredo (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Rémi Denis-Courmont (rdenis) wrote :

FYI, this is now in Debian incoming, so it should be fixed in Ubuntu 10.04 or whatever.

Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

I've been using the script and I'm not sure it fixes the whole problem. Also, does Ubuntu still use the /etc/init.d etc. scripts. Atleast I got the impression that most services moved to using upstart.

Revision history for this message
Chris Cowan (macil) wrote :

Can you elaborate on what doesn't seem to be fixed? This script tells miredo to reload whenever a network interface comes down or up. However, it can't know to reload it if for example, a router loses internet connectivity but still keeps the connection to the computer up. That case would need to be handled inside miredo itself (implemented that it would continually attempt to reconnect if it lost connection or similar).

Also, the /etc/init.d startup script is kind of off-topic here, but Ubuntu 9.10 still can use it.

Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

I don't know. My understanding of the problem at the moment is pretty much "I command ifconfig at an arbitrary moment when network is working fine, and the teredo interface is not visible in the list" then after doing "sudo /etc/init.d/miredo restart" it reappears.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package miredo - 1.2.1-1

---------------
miredo (1.2.1-1) unstable; urgency=low

  * New upstream version.
  * Initscript handles force-start and force-stop (Closes: #538290)
    (Patch by Jakob Haufe).
  * Fix miredo-server runlevels (Closes: #541225)
    (Patch by Petter Reinholdtsen).
  * Put udev before makedev as pre-dependency (Closes: #546881).
  * Remove /var/run subdirectories from the packages.
  * Update standards version to 3.8.3.
  * Make the package installable on FreeBSD kernel (Closes: #550114).
  * Remove legacy libfreebsd-dev dependency (Closes: #552603).
  * Fix LSB initscripts Provides statements to match package names.
  * Reload miredo when an IPv4 interface is brought up (LP: #304958).
 -- Ubuntu Archive Auto-Sync <email address hidden> Tue, 17 Nov 2009 17:46:32 +0000

Changed in miredo (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

I retrieved miredo 1.2.1-1 package from Debian and installed it on my Ubuntu Karmic. Installation went ok, and teredo interface came up as a result. Then I closed my laptop lid. I've set it to only affect the screen backlight. After a good nights sleep I opened my lid and started working again. My wireless connection was down, so I picked it from the list manually and it reconnected. ~1 hour later I run ifconfig and noticed teredo interface had disappeared again.

Changed in miredo (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Rémi Denis-Courmont (rdenis) wrote :

That's a different bug. Newer Miredo dies unexpectedly on reload signals.

Changed in miredo (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

The other bug should be registered with Launchpad, if it is not already. Please subscribe me to that bug.

Revision history for this message
Rémi Denis-Courmont (rdenis) wrote :

That's <email address hidden> for you.

Peter Berry (pwberry)
Changed in network-manager (Ubuntu):
status: Incomplete → Invalid
Curtis Hovey (sinzui)
no longer affects: null
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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