network: don't allow dots in interface name if -V

This commit is contained in:
tschettervictor
2025-08-25 14:58:25 -06:00
committed by GitHub
parent 8614a6da63
commit 49bea0ba2f

View File

@@ -211,6 +211,13 @@ validate_netif() {
else
error_exit "Invalid: (${_interface})."
fi
# Don't allow dots in INTERFACE if -V
if [ "${VNET}" -eq 1 ] && [ "${BRIDGE}" -eq 0 ]; then
if echo "${INTERFACE}" | grep -q "\."; then
error_exit "[ERROR]: [-V|--vnet] does not support dots (.) in interface names."
fi
fi
}
check_interface_added() {