From 002ebcf7f6e4bae7feb28be3bc618a5f4f971f88 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Fri, 16 Sep 2022 14:27:31 +0100 Subject: [PATCH] Prevent race starting socket unit file FreeBind is recommended option when binding to a specific address: ``` For robustness reasons it is recommended to use this option whenever you bind a socket to a specific IP address ``` https://www.freedesktop.org/software/systemd/man/systemd.socket.html#FreeBind= Fixes #66 --- templates/socket.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/socket.j2 b/templates/socket.j2 index 973d112..04f7476 100644 --- a/templates/socket.j2 +++ b/templates/socket.j2 @@ -2,3 +2,6 @@ [Socket] ListenStream= ListenStream={{ _libvirt_listen_stream }} +# FreeBind is recommended when listening on a specific address: +# https://www.freedesktop.org/software/systemd/man/systemd.socket.html#FreeBind= +FreeBind=true