From fcfb592adc0ce754518e8d744df769e5ecf2d15c Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 22 May 2024 19:35:25 +0200 Subject: passt, tap: Don't use -1 as uninitialised value for fd_tap_listen 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 Reviewed-by: David Gibson --- tap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tap.c') 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 -- cgit v1.2.3