virt-manager/53342f31-set-right-ip-address-for-ipv6.patch

29 lines
1.1 KiB
Diff
Raw Normal View History

Subject: createinterface: set right ip address for ipv6
From: Chen Hanxiao chenhanxiao@cn.fujitsu.com Thu Mar 27 22:01:21 2014 +0800
Date: Thu Mar 27 22:01:21 2014 +0800:
Git: 58d8795b27b792bbbc89b93ac9333253df205943
We use v4_addr for building ipv6 addr.
This patch will use right ip address for ipv6.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
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]