1
0
Fork 0
mirror of https://passt.top/passt synced 2025-06-14 19:35:35 +02:00

conf, tap: Add option to quit once the client closes the connection

This is practical to avoid explicit lifecycle management in users,
e.g. libvirtd, and is trivial to implement.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Stefano Brivio 2022-10-07 04:01:56 +02:00
parent 9de65dd3f4
commit a62ed181db
4 changed files with 27 additions and 1 deletions

5
tap.c
View file

@ -1011,5 +1011,10 @@ void tap_handler(struct ctx *c, int fd, uint32_t events,
return;
reinit:
if (c->one_off) {
info("Client closed connection, exiting");
exit(EXIT_SUCCESS);
}
tap_sock_init(c);
}