]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
schema: use a better regex for listen addresses
authorJán Tomko <jtomko@redhat.com>
Thu, 26 Nov 2015 09:39:54 +0000 (10:39 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 26 Nov 2015 10:05:18 +0000 (11:05 +0100)
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
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.args
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml

index 7e7fd583f9a715c74a42dd6803001f3274fc7050..95366bbe0081c29cdb4a2bc0d61e8ed4ded97dda 100644 (file)
     </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">
index 473b0e54a3ee3bbe7ff66b2e01ff652c571ebf14..36e42e5abcc3e32dcd0c4d94182b868eed259a4f 100644 (file)
@@ -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
index 4b88e492b4b612f860db1cadf93c16cde5bdf579..1c76ddc81a58249b3925f537340f086cda9605d2 100644 (file)
@@ -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'/>