Bug 788444 - spice info for ipv6 channels is invalid
Summary: spice info for ipv6 channels is invalid
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-server
Version: 6.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Yonit Halperin
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 748534 769512
TreeView+ depends on / blocked
 
Reported: 2012-02-08 08:46 UTC by Yonit Halperin
Modified: 2012-06-20 12:17 UTC (History)
16 users (show)

Fixed In Version: spice-server-0.10.1-2
Doc Type: Bug Fix
Doc Text:
Clone Of: 769512
Environment:
Last Closed: 2012-06-20 12:17:08 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0765 0 normal SHIPPED_LIVE spice-server bug fix and enhancement update 2012-06-19 19:30:21 UTC

Description Yonit Halperin 2012-02-08 08:46:33 UTC
+++ This bug was initially created as a clone of Bug #769512 +++

Description of problem:
The command line parameter value of ipv4/ipv6 force using the specified IP version. But when use the ipv6 parameter in the CLI, the addresses reported looks broken, it isn't a valid ipv6 address.

Version-Release number of selected component (if applicable):
host info:
#uname -r && rpm -q qemu-kvm
2.6.32-220.el6.x86_64
qemu-kvm-0.12.1.2-2.210.el6.x86_64
# rpm -qa | grep spice
spice-glib-0.6-2.el6.x86_64
spice-gtk-0.6-2.el6.x86_64
spice-gtk-python-0.6-2.el6.x86_64
spice-client-0.8.2-7.el6.x86_64
spice-vdagent-0.8.1-3.el6.x86_64
spice-server-0.8.2-5.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. start a guest and force specific ip protocol by using the ipv4/ipv6 parameter.
eg:
   ...-spice disable-ticketing,port=5991,ipv4 -vga qxl
   ...-spice disable-ticketing,port=5991,ipv6 -vga qxl
2. check whenever spice client and server are using
ipv4 or ipv6.
for the parameter of ipv4:
(qemu) info spice 
Server:
     address: 0.0.0.0:5910
        auth: none
Channel:
     address: 10.66.8.242:34462
     session: 1804289383
     channel: 1:0
...
# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State      
...
tcp        0      0 10.66.9.109:5910            10.66.8.242:34462           ESTABLISHED 
...

for the parameter of ipv6:
(qemu) info spice 
Server:
     address: 0.0.0.0:5910
        auth: none
Channel:
     address: ::1c00:0:1c00:0%3263259504:55574
     session: 1804289383
     channel: 1:0
...
# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State      
...    
tcp        0      0 ::ffff:10.66.9.109:5910     ::ffff:10.66.8.242:59698    ESTABLISHED
...
  
Actual results:
For the parameter of ipv4,the addresses reported was correctly.
For the parameter of ipv6,the addresses reported was broken, it certainly isn't a valid ipv6 address.

Expected results:
The addresses reported was correctly, or even should display some message at least when was broken.

Additional info:

--- Additional comment from yhalperi on 2011-12-22 09:58:53 EST ---

The title of this bug is confusing.
You mean that the "info spice", when the client is connected with ipv6 address,
doesn't print the address correctly, right?

--- Additional comment from sluo on 2011-12-23 04:14:26 EST ---

(In reply to comment #1)
> The title of this bug is confusing.
> You mean that the "info spice", when the client is connected with ipv6 address,
> doesn't print the address correctly, right?

Hi Yonit,

   Because it didn't display the address correctly, so i have no idea how to connect the guest by the ipv6 address. It just didn't display the address correctly(ipv6 addr)by using the "info spice" command in the Monitor. 

The IPV6 of the host is enabled, but "info spice" cann't print IPV6 info correctly. The ifconfig of host info as following:
# ifconfig switch
switch    Link encap:Ethernet  HWaddr 78:2B:CB:9A:8C:C9  
          inet addr:10.66.9.109  Bcast:10.66.11.255  Mask:255.255.252.0
          inet6 addr: fe80::7a2b:cbff:fe9a:8cc9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:184530998 errors:0 dropped:0 overruns:0 frame:0
          TX packets:88482966 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:301251797212 (280.5 GiB)  TX bytes:123991899146 (115.4 GiB)

eg: For the parameter of ipv6
(qemu) info spice 
Server:
     address: 0.0.0.0:5910
        auth: none
Channel:
     address: ::1c00:0:1c00:0%3263259504:55574
     session: 1804289383
     channel: 1:0
...
In the host:
# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address            
State      
...    
tcp        0      0 ::ffff:10.66.9.109:5910     ::ffff:10.66.8.242:59698   
ESTABLISHED

--- Additional comment from kraxel on 2012-01-03 06:45:38 EST ---

Created attachment 550400 [details]
rfc partch for spice server

Damn.  Bug is in the spice server library API.  struct sockaddr is simply too small to hold a full ipv6 address.  Guess we need a patch like the attached (for spice server), and qemu adaptions to use the new fields (if present) of course.

Comment 5 Yonit Halperin 2012-02-22 13:39:45 UTC
This bug can be verified only after 769512 fix will be included in qemu-kvm build

Comment 6 David Jaša 2012-03-05 14:36:35 UTC
VERIFIED on:
qemu-kvm-0.12.1.2-2.236.el6.x86_64
spice-server-0.10.1-1.el6.x86_64

$ netstat -putna | grep qemu
tcp 0 0 2620:52:0:221d:f2de:f1:3000 :::* LISTEN 6577/qemu-kvm

(qemu) info spice
Server:
     address: 2620:52:0:221d:f2de:f1ff:fe04:c0fa:3000
        auth: spice
Channels: none
(qemu)


Also added TCMS test case

Comment 7 Qunfang Zhang 2012-03-06 09:43:33 UTC
Hello David
I am verifying the issue in the qemu part, that's 769512. I tested with the latest qemu-kvm-0.12.1.2-2.238.el6.x86_64 and spice-server-0.10.1-4.el6.x86_64, but the problem still exists. 
Steps:
1.Boot guest with "-spice
port=5930,disable-ticketing,ipv6 -vga qxl -global qxl-vga.vram_size=33554432"

(qemu) info spice 
Server:
     address: 0.0.0.0:5930
        auth: none
Channel:
     address: ::1c00:0:1c00:0%706150410:50979
     session: 1804289383
     channel: 1:0
.......

# netstat -ant
tcp        0      0 ::ffff:10.66.9.184:5930     ::ffff:10.66.9.184:50980   
ESTABLISHED 

So, do you know what's the difference with your steps and mine?  Thanks ~~

Comment 8 Yonit Halperin 2012-03-06 10:05:11 UTC
(In reply to comment #6)
> VERIFIED on:
> qemu-kvm-0.12.1.2-2.236.el6.x86_64
> spice-server-0.10.1-1.el6.x86_64
> 
The fix was introduced only in spice-server-0.10.1-2
> $ netstat -putna | grep qemu
> tcp 0 0 2620:52:0:221d:f2de:f1:3000 :::* LISTEN 6577/qemu-kvm
> 
> (qemu) info spice
> Server:
>      address: 2620:52:0:221d:f2de:f1ff:fe04:c0fa:3000
It is not exactly the same address display above +
you should also test it we connected client
>         auth: spice
> Channels: none
> (qemu)
> 
> 
> Also added TCMS test case

Comment 9 David Jaša 2012-03-07 18:37:43 UTC
(In reply to comment #7)
> Hello David
> I am verifying the issue in the qemu part, that's 769512. I tested with the
> latest qemu-kvm-0.12.1.2-2.238.el6.x86_64 and spice-server-0.10.1-4.el6.x86_64,
> but the problem still exists. 

Yonit is right - I overlooked the difference in IPs so the bug is yet to be verified.

(In reply to comment #8)
> It is not exactly the same address display above +
> you should also test it we connected client

I don't think so - verifying that address passed on CLI, displayed in qemu monitor and reported by netstat match.

Comment 10 Marian Krcmarik 2012-03-07 20:36:15 UTC
Qunfang, Thanks for the catch!

Comment 11 Qunfang Zhang 2012-03-08 02:32:18 UTC
Marian, welcome and thanks for you guys confirmation ~

Comment 13 Marian Krcmarik 2012-04-16 17:38:12 UTC
Verified on 
qemu-kvm-0.12.1.2-2.275.el6.x86_64
spice-server-0.10.1-5.el6.x86_64

Comment 15 errata-xmlrpc 2012-06-20 12:17:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0765.html


Note You need to log in before you can comment on or make changes to this bug.