qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL v1 2/2] io: fix FD socket handling in DNS lookup


From: Daniel P. Berrange
Subject: [Qemu-devel] [PULL v1 2/2] io: fix FD socket handling in DNS lookup
Date: Tue, 4 Apr 2017 16:20:11 +0100

The qio_dns_resolver_lookup_sync() method is required to be a no-op
for socket kinds that don't require name resolution. Thus the KIND_FD
handling should not return an error.

Signed-off-by: Daniel P. Berrange <address@hidden>
---
 io/dns-resolver.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/io/dns-resolver.c b/io/dns-resolver.c
index a407075..759d1b4 100644
--- a/io/dns-resolver.c
+++ b/io/dns-resolver.c
@@ -158,16 +158,13 @@ int qio_dns_resolver_lookup_sync(QIODNSResolver *resolver,
 
     case SOCKET_ADDRESS_KIND_UNIX:
     case SOCKET_ADDRESS_KIND_VSOCK:
+    case SOCKET_ADDRESS_KIND_FD:
         return qio_dns_resolver_lookup_sync_nop(resolver,
                                                 addr,
                                                 naddrs,
                                                 addrs,
                                                 errp);
 
-    case SOCKET_ADDRESS_KIND_FD:
-        error_setg(errp, "Unsupported socket address type 'fd'");
-        return -1;
-
     default:
         abort();
     }
-- 
2.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]