From ed97320d8dfa0824a46ecf695d7e3b6499c2ab0a Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 8 Feb 2026 11:15:35 +0100 Subject: [PATCH 1/2] Limit VPN interface names to 15 chars --- qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh | 4 ++++ qbittorrent/rootfs/etc/cont-init.d/94-wireguard.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh index d9688c47d..7f8f61530 100755 --- a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh @@ -85,6 +85,10 @@ elif [[ ${interface_name} = "tun" ]]; then elif [[ ${interface_name} = "tap" ]]; then interface_name='tap0' fi +if [[ ${#interface_name} -gt 15 ]]; then + bashio::log.warning "OpenVPN interface name '${interface_name}' exceeds 15 characters; truncating to '${interface_name:0:15}'." + interface_name="${interface_name:0:15}" +fi openvpn_runtime_config="${OPENVPN_STATE_DIR}/${interface_name}.conf" diff --git a/qbittorrent/rootfs/etc/cont-init.d/94-wireguard.sh b/qbittorrent/rootfs/etc/cont-init.d/94-wireguard.sh index 855ef7504..833084bd4 100755 --- a/qbittorrent/rootfs/etc/cont-init.d/94-wireguard.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/94-wireguard.sh @@ -61,6 +61,10 @@ interface_name="$(basename "${wireguard_config}" .conf)" if [[ -z "${interface_name}" ]]; then interface_name='wg0' fi +if [[ ${#interface_name} -gt 15 ]]; then + bashio::log.warning "WireGuard interface name '${interface_name}' exceeds 15 characters; truncating to '${interface_name:0:15}'." + interface_name="${interface_name:0:15}" +fi wireguard_runtime_config="${WIREGUARD_STATE_DIR}/${interface_name}.conf" From 2d4eaaa44cfea4503d8d22c4ac1d748e6e548f81 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 8 Feb 2026 11:16:24 +0100 Subject: [PATCH 2/2] Remove interface name length restriction Removed truncation of OpenVPN interface name if it exceeds 15 characters. --- qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh index 7f8f61530..d9688c47d 100755 --- a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh @@ -85,10 +85,6 @@ elif [[ ${interface_name} = "tun" ]]; then elif [[ ${interface_name} = "tap" ]]; then interface_name='tap0' fi -if [[ ${#interface_name} -gt 15 ]]; then - bashio::log.warning "OpenVPN interface name '${interface_name}' exceeds 15 characters; truncating to '${interface_name:0:15}'." - interface_name="${interface_name:0:15}" -fi openvpn_runtime_config="${OPENVPN_STATE_DIR}/${interface_name}.conf"