True link equalizer (teql0 device) causes python-netifaces to misbehave

Bug #753009 reported by Alex Myodov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netifaces (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

The usual workflow for netifaces modules, when you get the list of interfaces via netifaces.interfaces() and then, for every interface, get the details via netifaces.ifaddresses(), fails when you have a teql0 device in the system:

Python 2.7.1+ (r271:86832, Feb 24 2011, 15:11:59)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import netifaces
>>> netifaces.interfaces()
['lo', 'eth0', 'dummy0', 'teql0', 'tunl0', 'gre0', 'sit0', 'ip6tnl0']
>>> netifaces.ifaddresses("teql0")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: You must specify a valid interface name.

The issue was mentioned by the author once ( http://alastairs-place.net/2007/03/netifaces ), but either he did not fix it upstream, or it was not propagated to Ubuntu; in any event, this is still present in natty's python-netifaces=0.5-2.1build1.

The fix for the issue was proposed at the author's page as well ("Well in a way, the problem is that the line ”found = TRUE;” should be above the test for a no-address entry. That way you'd get an empty dictionary rather than a ValueError."), would be great to either persuade author to fix it, or to fix it ourselves and propagate to Debian.

Revision history for this message
Chuck Short (zulcss) wrote :

Still a problem with oneiric as well.

chuck

Changed in netifaces (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
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.