Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.1
virt-viewer
virtview-git-wildcard-hostname.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File virtview-git-wildcard-hostname.patch of Package virt-viewer
Subject: Fix hostname when XML gives a wildcard address From: Daniel P. Berrange berrange@redhat.com Mon Sep 19 16:37:57 2011 +0100 Date: Mon Sep 19 16:37:57 2011 +0100: Git: 41703dd4581c064a110ee3b4371920cbc9356613 When the guest XML contains a wildcard address like 0.0.0.0 or ::, we can't directly use connect() on it. Instead we have to use the hostname/IP from the libvirt URI. Index: virt-viewer-0.4.1/src/virt-viewer.c =================================================================== --- virt-viewer-0.4.1.orig/src/virt-viewer.c +++ virt-viewer-0.4.1/src/virt-viewer.c @@ -325,6 +325,19 @@ virt_viewer_extract_connect_info(VirtVie goto cleanup; } + /* If the XML listen attribute shows a wildcard address, we need to + * throw that away since you obviously can't 'connect(2)' to that + * from a remote host. Instead we fallback to the hostname used in + * the libvirt URI. This isn't perfect but it is better than nothing + */ + if (strcmp(ghost, "0.0.0.0") == 0 || + strcmp(ghost, "::") == 0) { + DEBUG_LOG("Guest graphics listen '%s' is a wildcard, replacing with '%s'", + ghost, host); + g_free(ghost); + ghost = g_strdup(host); + } + virt_viewer_app_set_connect_info(app, host, ghost, gport, transport, unixsock, user, port); retval = TRUE;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor