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:
parent
9de65dd3f4
commit
a62ed181db
4 changed files with 27 additions and 1 deletions
5
tap.c
5
tap.c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue