diff options
author | Markus Armbruster <armbru@redhat.com> | 2017-03-30 19:43:09 +0200 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2017-04-03 17:11:39 +0200 |
commit | ca0b64e5ed5c60543ff4758c858f65cd090512f0 (patch) | |
tree | 193bea3d618e149693f1a4831865ef982f06ac32 /util/qemu-sockets.c | |
parent | 9588c5897b83a43c80b810ec44e575e1032378d4 (diff) |
nbd sockets vnc: Mark problematic address family tests TODO
Certain features make sense only with certain address families. For
instance, passing file descriptors requires AF_UNIX. Testing
SocketAddress's saddr->type == SOCKET_ADDRESS_KIND_UNIX is obvious,
but problematic: it can't recognize AF_UNIX when type ==
SOCKET_ADDRESS_KIND_FD.
Mark such tests of saddr->type TODO. We may want to check the address
family with getsockname() there.
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1490895797-29094-2-git-send-email-armbru@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'util/qemu-sockets.c')
-rw-r--r-- | util/qemu-sockets.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index 40164bf681..9b7368113c 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -1154,6 +1154,10 @@ int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **errp) { int fd; + /* + * TODO SOCKET_ADDRESS_KIND_FD when fd is AF_INET or AF_INET6 + * (although other address families can do SOCK_DGRAM, too) + */ switch (remote->type) { case SOCKET_ADDRESS_KIND_INET: fd = inet_dgram_saddr(remote->u.inet.data, |