[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-bugs] [Bug 231] New: choose_vnc_display deals poorly with IPv6 netstat output



http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=231

           Summary: choose_vnc_display deals poorly with IPv6 netstat output
           Product: Xen
           Version: unstable
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Tools
        AssignedTo: xen-bugs@xxxxxxxxxxxxxxxxxxx
        ReportedBy: nickolai@xxxxxxxxxxxxxxx


The choose_vnc_display function in create.py deals poorly with IPv6-style 
netstat output, e.g. when the ipv6 module is loaded, because IPv6 addresses 
contain colons.

This simple patch fixes the problem:

diff -r bd477fcd32ab tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Thu Sep 15 04:12:54 2005
+++ b/tools/python/xen/xm/create.py     Wed Sep 14 21:50:27 2005
@@ -673,8 +673,9 @@
             # Local port is field 3.
             y = x.split()[3]
             # Field is addr:port, split off the port.
-            y = y.split(':')[1]
-            r.append(int(y))
+            y = y.split(':')
+            z = y[len(y) - 1]
+            r.append(int(z))
         return r

     ports = netstat_local_ports()

-- 
Configure bugmail: 
http://bugzilla.xensource.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

_______________________________________________
Xen-bugs mailing list
Xen-bugs@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-bugs


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.