[virt-tools-list] [virt-manager PATCH] createinterface: set right ip address for ipv6

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Thu Mar 27 09:15:58 UTC 2014


We use v4_addr for building ipv6 addr.
This patch will use right ip address for ipv6.

Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
 virtManager/createinterface.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/virtManager/createinterface.py b/virtManager/createinterface.py
index 77fb6e1..11fc9b2 100644
--- a/virtManager/createinterface.py
+++ b/virtManager/createinterface.py
@@ -818,9 +818,10 @@ class vmmCreateInterface(vmmGObjectUI):
                 if not ipv6.dhcp:
                     if v6_gate:
                         ipv6.gateway = v6_gate
-                    addr, prefix = build_ip(v4_addr)
-                    if addr:
-                        ipv6.add_ip(addr, prefix)
+                    for v6_addr in v6_addrlist:
+                        addr, prefix = build_ip(v6_addr)
+                        if addr:
+                            ipv6.add_ip(addr, prefix)
 
         return [is_manual, copy_name, ipv4, ipv6, proto_xml]
 
-- 
1.8.5.3




More information about the virt-tools-list mailing list