Description: Fix qweborf if miredo is in use
 Miredo creates a virtual network interface with a global IPv6 address.
 The interface lacks an hw address, condition that caused qweborf to crash
 miserably if it was being used.
 .
 weborf (0.13-2) unstable; urgency=low
 .
   * Backport fix from upstream: qweborf doesn't crash when miredo is in use
Author: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: upstream
Reviewed-By: Salvo "LtWorf" Tomaselli <tiposchi@tiscali.it>
Last-Update: 2011-12-19

--- weborf-0.13.orig/qweborf/nhelper.py
+++ weborf-0.13/qweborf/nhelper.py
@@ -131,8 +131,9 @@ def getifaddrs():
  
         if name not in result:
             result[name] = {}
- 
-        sa = sockaddr.from_address(ifa.ifa_addr)
+
+        if ifa.ifa_addr != None:
+            sa = sockaddr.from_address(ifa.ifa_addr)
  
         if sa.sa_family not in result[name]:
             result[name][sa.sa_family] = []
