On Wed, May 22, 2024 at 10:59:06PM +0200, Stefano Brivio wrote:This is a remnant from the time we kept access to the original filesystem and we could reinitialise the listening AF_UNIX socket. Since commit 0515adceaa8f ("passt, pasta: Namespace-based sandboxing, defer seccomp policy application"), however, we can't re-bind the listening socket once we're up and running. Drop the -1 initalisation and the corresponding check. Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>Reviewed-by: David Gibson <david(a)gibson.dropbear.id.au>--- passt.c | 2 +- tap.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/passt.c b/passt.c index 771b8a7..1df1dc4 100644 --- a/passt.c +++ b/passt.c @@ -211,7 +211,7 @@ int main(int argc, char **argv) isolate_initial(); - c.pasta_netns_fd = c.fd_tap = c.fd_tap_listen = -1; + c.pasta_netns_fd = c.fd_tap = -1; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; diff --git a/tap.c b/tap.c index 177fe26..cb6df5a 100644 --- a/tap.c +++ b/tap.c @@ -1304,8 +1304,7 @@ void tap_sock_init(struct ctx *c) } if (c->mode == MODE_PASST) { - if (c->fd_tap_listen == -1) - tap_sock_unix_init(c); + tap_sock_unix_init(c); /* In passt mode, we don't know the guest's MAC address until it * sends us packets. Use the broadcast address so that our-- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson