A domain with '::' as the listen address fails to validate.
Reuse the 'ipAddr' and 'dnsName' regexes from basictypes instead
of reinventing them.
https://bugzilla.redhat.com/show_bug.cgi?id=1285665
---
docs/schemas/domaincommon.rng | 7 ++++---
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml | 4 ++--
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 7e7fd58..95366bb 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -5221,9 +5221,10 @@
</data>
</define>
<define name="addrIPorName">
- <data type="string">
- <param
name="pattern">(([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9])|(([0-9a-fA-F]+|:)+[0-9a-fA-F]+)|([a-zA-Z0-9_\.\+\-]*)</param>
- </data>
+ <choice>
+ <ref name="ipAddr"/>
+ <ref name="dnsName"/>
+ </choice>
</define>
<define name="usbIdDefault">
<data type="string">
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.args
b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.args
index 473b0e5..36e42e5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.args
@@ -19,5 +19,5 @@ QEMU_AUDIO_DRV=none \
-net none \
-serial none \
-parallel none \
--vnc 127.0.0.1:59630,share=allow-exclusive \
+-vnc '[::]:59630,share=allow-exclusive' \
-vga cirrus
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml
b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml
index 4b88e49..1c76ddc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml
@@ -25,8 +25,8 @@
<controller type='pci' index='0' model='pci-root'/>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
- <graphics type='vnc' port='65530' autoport='no'
listen='127.0.0.1' sharePolicy='allow-exclusive'>
- <listen type='address' address='127.0.0.1'/>
+ <graphics type='vnc' port='65530' autoport='no'
listen='::' sharePolicy='allow-exclusive'>
+ <listen type='address' address='::'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1'/>
--
2.4.6