summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/qemu-sockets.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 38f82179b0..3ceaa81226 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -925,7 +925,7 @@ static int unix_listen_saddr(UnixSocketAddress *saddr,
if (saddr->abstract) {
un.sun_path[0] = '\0';
memcpy(&un.sun_path[1], path, pathlen);
- if (saddr->tight) {
+ if (!saddr->has_tight || saddr->tight) {
addrlen = offsetof(struct sockaddr_un, sun_path) + 1 + pathlen;
}
} else {
@@ -985,7 +985,7 @@ static int unix_connect_saddr(UnixSocketAddress *saddr, Error **errp)
if (saddr->abstract) {
un.sun_path[0] = '\0';
memcpy(&un.sun_path[1], saddr->path, pathlen);
- if (saddr->tight) {
+ if (!saddr->has_tight || saddr->tight) {
addrlen = offsetof(struct sockaddr_un, sun_path) + 1 + pathlen;
}
} else {