]> xenbits.xensource.com Git - libvirt.git/commitdiff
daemon: Always advertise libvirtd service
authorOsier Yang <jyang@redhat.com>
Tue, 11 Oct 2011 12:48:42 +0000 (20:48 +0800)
committerOsier Yang <jyang@redhat.com>
Wed, 12 Oct 2011 12:37:05 +0000 (20:37 +0800)
This is a regression introduced by new RPC codes, previously
we advertise the service via ssh even if the daemon doesn't
listen on TLS port (TCP is not choosed). Now the service is
only advertised when it listens on TLS or TCP port. This breaks
upper layer apps which intends to discover the service, such
as virt-manager.

daemon/libvirtd.c

index d1bc3ddda75d305a1c6d51a770b19af21caf1c78..2f0e1be7df9ca7d216c4aa5cc1245f6f9b330a18 100644 (file)
@@ -470,8 +470,12 @@ static int daemonSetupNetworking(virNetServerPtr srv,
                                              NULL)))
         goto error;
 
-    if (virNetServerAddService(srv, svc, NULL) < 0)
+    if (virNetServerAddService(srv, svc,
+                               config->mdns_adv && !ipsock ?
+                               "_libvirt._tcp" :
+                               NULL) < 0)
         goto error;
+
     if (svcRO &&
         virNetServerAddService(srv, svcRO, NULL) < 0)
         goto error;