]> Git Repo - qemu.git/commit
sockets: Fix socket_sockaddr_to_address_unix() for abstract sockets
authorMarkus Armbruster <[email protected]>
Mon, 2 Nov 2020 09:44:19 +0000 (10:44 +0100)
committerDaniel P. Berrangé <[email protected]>
Tue, 3 Nov 2020 13:09:41 +0000 (13:09 +0000)
commit3b14b4ec49a801067da19d6b8469eb1c1911c020
treee309bb71653a25bc15235ac709fbe29d90705fd3
parentb08cc97d6ba4250439829a8a1d476064a1cb54da
sockets: Fix socket_sockaddr_to_address_unix() for abstract sockets

Commit 776b97d360 "qemu-sockets: add abstract UNIX domain socket
support" neglected to update socket_sockaddr_to_address_unix().  The
function returns a non-abstract socket address for abstract
sockets (wrong) with a null @path (also wrong; a non-optional QAPI str
member must never be null).

The null @path is due to confused code going back all the way to
commit 17c55decec "sockets: add helpers for creating SocketAddress
from a socket".

Add the required special case, and simplify the confused code.

Fixes: 776b97d3605ed0fc94443048fdf988c7725e38a9
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Daniel P. Berrangé <[email protected]>
util/qemu-sockets.c
This page took 0.025466 seconds and 4 git commands to generate.