Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions internal/confparser/confparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,12 @@ func (f *FieldConfig) validateSingleValue(val string, index int) error {
if _, err := net.ParseMAC(val); err != nil {
return fmt.Errorf("%s is not a valid MAC address: %s", fieldRef, val)
}
case "hostname_or_ipv4_or_ipv6":
if net.ParseIP(val) == nil {
if _, err := idna.Lookup.ToASCII(val); err != nil {
return fmt.Errorf("%s is not a valid hostname, IPv4 or IPv6 address: %s", fieldRef, val)
}
}
case "hostname":
if _, err := idna.Lookup.ToASCII(val); err != nil {
return fmt.Errorf("%s is not a valid hostname: %s", fieldRef, val)
Expand Down
2 changes: 1 addition & 1 deletion internal/network/types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type NetworkConfig struct {
TimeSyncOrdering []string `json:"time_sync_ordering,omitempty" one_of:"http,ntp,ntp_dhcp,ntp_user_provided,http_user_provided" default:"ntp,http"`
TimeSyncDisableFallback null.Bool `json:"time_sync_disable_fallback,omitempty" default:"false"`
TimeSyncParallel null.Int `json:"time_sync_parallel,omitempty" default:"4"`
TimeSyncNTPServers []string `json:"time_sync_ntp_servers,omitempty" validate_type:"ipv4_or_ipv6" required_if:"TimeSyncOrdering=ntp_user_provided"`
TimeSyncNTPServers []string `json:"time_sync_ntp_servers,omitempty" validate_type:"hostname_or_ipv4_or_ipv6" required_if:"TimeSyncOrdering=ntp_user_provided"`
TimeSyncHTTPUrls []string `json:"time_sync_http_urls,omitempty" validate_type:"url" required_if:"TimeSyncOrdering=http_user_provided"`
}

Expand Down
25 changes: 25 additions & 0 deletions ui/localization/messages/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -688,11 +688,36 @@
"network_settings_load_error": "Kunne ikke indlæse netværksindstillinger: {error}",
"network_static_ipv4_header": "Statisk IPv4-konfiguration",
"network_static_ipv6_header": "Statisk IPv6-konfiguration",
"network_time_sync_add_http_url": "Tilføj HTTP URL",
"network_time_sync_add_ntp_server": "Tilføj NTP-server",
"network_time_sync_config_header": "Tidssynkroniseringskonfiguration",
"network_time_sync_custom": "Skik",
"network_time_sync_description": "Konfigurer indstillinger for tidssynkronisering",
"network_time_sync_disable_fallback_description": "Undgå brug af indbyggede servere til tidssynkronisering",
"network_time_sync_disable_fallback_title": "Deaktiver Fallback",
"network_time_sync_http_only": "Kun HTTP",
"network_time_sync_http_url_invalid": "Ugyldig URL for HTTP-tidssynkronisering",
"network_time_sync_http_url_required": "HTTP-tidssynkroniserings-URL påkrævet med brugerleveret HTTP-URL-kilde",
"network_time_sync_no_matching_sources": "Ingen matchende kilder fundet",
"network_time_sync_ntp_and_http": "NTP og HTTP",
"network_time_sync_ntp_only": "Kun NTP",
"network_time_sync_ntp_server_invalid": "Ugyldig NTP-server",
"network_time_sync_ntp_server_required": "NTP Time Sync Server påkrævet med brugerleveret NTP-serverkilde",
"network_time_sync_ordering_description": "Prioritering af tidssynkroniseringskilder.",
"network_time_sync_ordering_required": "Der kræves mindst én synkroniseringskilde",
"network_time_sync_ordering_title": "Synkronisering Kildebestilling",
"network_time_sync_parallel_description": "Antal servere, der skal forespørges parallelt",
"network_time_sync_parallel_invalid": "Parallelle forespørgsler skal være større end nul",
"network_time_sync_parallel_title": "Parallelle forespørgsler",
"network_time_sync_select_sources": "Vælg kilder...",
"network_time_sync_source_builtin_http": "Indbyggede HTTP-URL'er",
"network_time_sync_source_builtin_ntp": "Indbyggede NTP-servere",
"network_time_sync_source_dhcp": "DHCP NTP-servere",
"network_time_sync_source_user_http": "Brugerleverede HTTP-URL'er",
"network_time_sync_source_user_ntp": "Brugerleverede NTP-servere",
"network_time_sync_title": "Tidssynkronisering",
"network_time_sync_user_http_urls_label": "Brugerleverede HTTP-URL'er",
"network_time_sync_user_ntp_servers_label": "Brugerleverede NTP-servere",
"network_title": "Netværk",
"never_seen_online": "Aldrig set online",
"next": "Næste",
Expand Down
25 changes: 25 additions & 0 deletions ui/localization/messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -688,11 +688,36 @@
"network_settings_load_error": "Netzwerkeinstellungen konnten nicht geladen werden: {error}",
"network_static_ipv4_header": "Statische IPv4-Konfiguration",
"network_static_ipv6_header": "Statische IPv6-Konfiguration",
"network_time_sync_add_http_url": "HTTP-URL hinzufügen",
"network_time_sync_add_ntp_server": "NTP-Server hinzufügen",
"network_time_sync_config_header": "Konfiguration der Zeitsynchronisation",
"network_time_sync_custom": "Brauch",
"network_time_sync_description": "Konfigurieren der Zeitsynchronisierungseinstellungen",
"network_time_sync_disable_fallback_description": "Verhindern Sie die Verwendung integrierter Server zur Zeitsynchronisierung",
"network_time_sync_disable_fallback_title": "Fallback deaktivieren",
"network_time_sync_http_only": "Nur HTTP",
"network_time_sync_http_url_invalid": "Ungültige HTTP-Zeitsynchronisierungs-URL",
"network_time_sync_http_url_required": "HTTP-Zeitsynchronisierungs-URL erforderlich mit vom Benutzer bereitgestellter HTTP-URL-Quelle",
"network_time_sync_no_matching_sources": "Keine passenden Quellen gefunden",
"network_time_sync_ntp_and_http": "NTP und HTTP",
"network_time_sync_ntp_only": "Nur NTP",
"network_time_sync_ntp_server_invalid": "Ungültiger NTP-Server",
"network_time_sync_ntp_server_required": "NTP-Zeitsynchronisierungsserver mit vom Benutzer bereitgestellter NTP-Serverquelle erforderlich",
"network_time_sync_ordering_description": "Priorisierung von Zeitsynchronisationsquellen.",
"network_time_sync_ordering_required": "Es ist mindestens eine Synchronisationsquelle erforderlich",
"network_time_sync_ordering_title": "Reihenfolge der Synchronisationsquellen",
"network_time_sync_parallel_description": "Anzahl der Server, die parallel abgefragt werden sollen",
"network_time_sync_parallel_invalid": "Parallele Abfragen müssen größer als Null sein",
"network_time_sync_parallel_title": "Parallele Abfragen",
"network_time_sync_select_sources": "Quellen auswählen...",
"network_time_sync_source_builtin_http": "Integrierte HTTP-URLs",
"network_time_sync_source_builtin_ntp": "Integrierte NTP-Server",
"network_time_sync_source_dhcp": "DHCP-NTP-Server",
"network_time_sync_source_user_http": "Vom Benutzer bereitgestellte HTTP-URLs",
"network_time_sync_source_user_ntp": "Vom Benutzer bereitgestellte NTP-Server",
"network_time_sync_title": "Zeitsynchronisation",
"network_time_sync_user_http_urls_label": "Vom Benutzer bereitgestellte HTTP-URLs",
"network_time_sync_user_ntp_servers_label": "Vom Benutzer bereitgestellte NTP-Server",
"network_title": "Netzwerk",
"never_seen_online": "Noch nie online gesehen",
"next": "Nächste",
Expand Down
27 changes: 26 additions & 1 deletion ui/localization/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -693,11 +693,36 @@
"network_settings_load_error": "Failed to load network settings: {error}",
"network_static_ipv4_header": "Static IPv4 Configuration",
"network_static_ipv6_header": "Static IPv6 Configuration",
"network_time_sync_add_http_url": "Add HTTP URL",
"network_time_sync_add_ntp_server": "Add NTP Server",
"network_time_sync_config_header": "Time Synchronization Configuration",
"network_time_sync_custom": "Custom",
"network_time_sync_description": "Configure time synchronization settings",
"network_time_sync_disable_fallback_description": "Prevent use of built-in servers for time synchronization",
"network_time_sync_disable_fallback_title": "Disable Fallback",
"network_time_sync_http_only": "HTTP only",
"network_time_sync_http_url_invalid": "Invalid HTTP Time Sync URL",
"network_time_sync_http_url_required": "HTTP Time Sync URL required with User-provided HTTP URLs source",
"network_time_sync_no_matching_sources": "No matching sources found",
"network_time_sync_ntp_and_http": "NTP and HTTP",
"network_time_sync_ntp_only": "NTP only",
"network_time_sync_title": "Time synchronization",
"network_time_sync_ntp_server_invalid": "Invalid NTP Server",
"network_time_sync_ntp_server_required": "NTP Time Sync Server required with User-provided NTP Servers source",
"network_time_sync_ordering_description": "Prioritization of time synchronization sources.",
"network_time_sync_ordering_title": "Synchronization Source Ordering",
"network_time_sync_ordering_required": "At least one synchronization source is required",
"network_time_sync_parallel_invalid": "Parallel queries must be greater than zero",
"network_time_sync_parallel_description": "Number of servers to query in parallel",
"network_time_sync_parallel_title": "Parallel Queries",
"network_time_sync_select_sources": "Select sources...",
"network_time_sync_source_builtin_http": "Built-in HTTP URLs",
"network_time_sync_source_builtin_ntp": "Built-in NTP Servers",
"network_time_sync_source_dhcp": "DHCP NTP Servers",
"network_time_sync_source_user_http": "User-provided HTTP URLs",
"network_time_sync_source_user_ntp": "User-provided NTP Servers",
"network_time_sync_title": "Time Synchronization",
"network_time_sync_user_http_urls_label": "User-provided HTTP URLs",
"network_time_sync_user_ntp_servers_label": "User-provided NTP Servers",
"network_title": "Network",
"never_seen_online": "Never seen online",
"next": "Next",
Expand Down
25 changes: 25 additions & 0 deletions ui/localization/messages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -688,11 +688,36 @@
"network_settings_load_error": "No se pudo cargar la configuración de red: {error}",
"network_static_ipv4_header": "Configuración estática de IPv4",
"network_static_ipv6_header": "Configuración estática de IPv6",
"network_time_sync_add_http_url": "Agregar URL HTTP",
"network_time_sync_add_ntp_server": "Agregar servidor NTP",
"network_time_sync_config_header": "Configuración de sincronización horaria",
"network_time_sync_custom": "Costumbre",
"network_time_sync_description": "Configurar los ajustes de sincronización horaria",
"network_time_sync_disable_fallback_description": "Evite el uso de servidores integrados para la sincronización horaria",
"network_time_sync_disable_fallback_title": "Deshabilitar el respaldo",
"network_time_sync_http_only": "Sólo HTTP",
"network_time_sync_http_url_invalid": "URL de sincronización de hora HTTP no válida",
"network_time_sync_http_url_required": "Se requiere la URL de sincronización de hora HTTP con la fuente de URL HTTP proporcionada por el usuario",
"network_time_sync_no_matching_sources": "No se encontraron fuentes coincidentes",
"network_time_sync_ntp_and_http": "NTP y HTTP",
"network_time_sync_ntp_only": "Sólo NTP",
"network_time_sync_ntp_server_invalid": "Servidor NTP no válido",
"network_time_sync_ntp_server_required": "Se requiere un servidor de sincronización de hora NTP con una fuente de servidores NTP proporcionada por el usuario",
"network_time_sync_ordering_description": "Priorización de fuentes de sincronización horaria.",
"network_time_sync_ordering_required": "Se requiere al menos una fuente de sincronización",
"network_time_sync_ordering_title": "Orden de origen de sincronización",
"network_time_sync_parallel_description": "Número de servidores para consultar en paralelo",
"network_time_sync_parallel_invalid": "Las consultas paralelas deben ser mayores que cero.",
"network_time_sync_parallel_title": "Consultas paralelas",
"network_time_sync_select_sources": "Seleccionar fuentes...",
"network_time_sync_source_builtin_http": "URL HTTP integradas",
"network_time_sync_source_builtin_ntp": "Servidores NTP integrados",
"network_time_sync_source_dhcp": "Servidores DHCP NTP",
"network_time_sync_source_user_http": "URL HTTP proporcionadas por el usuario",
"network_time_sync_source_user_ntp": "Servidores NTP proporcionados por el usuario",
"network_time_sync_title": "Sincronización horaria",
"network_time_sync_user_http_urls_label": "URL HTTP proporcionadas por el usuario",
"network_time_sync_user_ntp_servers_label": "Servidores NTP proporcionados por el usuario",
"network_title": "Red",
"never_seen_online": "Nunca visto en línea",
"next": "Siguiente",
Expand Down
25 changes: 25 additions & 0 deletions ui/localization/messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -688,11 +688,36 @@
"network_settings_load_error": "Échec du chargement des paramètres réseau : {error}",
"network_static_ipv4_header": "Configuration IPv4 statique",
"network_static_ipv6_header": "Configuration IPv6 statique",
"network_time_sync_add_http_url": "Ajouter une URL HTTP",
"network_time_sync_add_ntp_server": "Ajouter un serveur NTP",
"network_time_sync_config_header": "Configuration de la synchronisation de l'heure",
"network_time_sync_custom": "Coutume",
"network_time_sync_description": "Configurer les paramètres de synchronisation de l'heure",
"network_time_sync_disable_fallback_description": "Empêcher l'utilisation de serveurs intégrés pour la synchronisation de l'heure",
"network_time_sync_disable_fallback_title": "Désactiver le repli",
"network_time_sync_http_only": "HTTP uniquement",
"network_time_sync_http_url_invalid": "URL de synchronisation de l'heure HTTP non valide",
"network_time_sync_http_url_required": "URL HTTP Time Sync requise avec la source d'URL HTTP fournie par l'utilisateur",
"network_time_sync_no_matching_sources": "Aucune source correspondante trouvée",
"network_time_sync_ntp_and_http": "NTP et HTTP",
"network_time_sync_ntp_only": "NTP uniquement",
"network_time_sync_ntp_server_invalid": "Serveur NTP invalide",
"network_time_sync_ntp_server_required": "Serveur NTP Time Sync requis avec la source de serveurs NTP fournie par l'utilisateur",
"network_time_sync_ordering_description": "Priorisation des sources de synchronisation horaire.",
"network_time_sync_ordering_required": "Au moins une source de synchronisation est requise",
"network_time_sync_ordering_title": "Ordre des sources de synchronisation",
"network_time_sync_parallel_description": "Nombre de serveurs à interroger en parallèle",
"network_time_sync_parallel_invalid": "Les requêtes parallèles doivent être supérieures à zéro",
"network_time_sync_parallel_title": "Requêtes parallèles",
"network_time_sync_select_sources": "Sélectionnez les sources...",
"network_time_sync_source_builtin_http": "URL HTTP intégrées",
"network_time_sync_source_builtin_ntp": "Serveurs NTP intégrés",
"network_time_sync_source_dhcp": "Serveurs DHCP NTP",
"network_time_sync_source_user_http": "URL HTTP fournies par l'utilisateur",
"network_time_sync_source_user_ntp": "Serveurs NTP fournis par l'utilisateur",
"network_time_sync_title": "Synchronisation horaire",
"network_time_sync_user_http_urls_label": "URL HTTP fournies par l'utilisateur",
"network_time_sync_user_ntp_servers_label": "Serveurs NTP fournis par l'utilisateur",
"network_title": "Réseau",
"never_seen_online": "Jamais vu en ligne",
"next": "Suivant",
Expand Down
25 changes: 25 additions & 0 deletions ui/localization/messages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -688,11 +688,36 @@
"network_settings_load_error": "Impossibile caricare le impostazioni di rete: {error}",
"network_static_ipv4_header": "Configurazione IPv4 statica",
"network_static_ipv6_header": "Configurazione IPv6 statica",
"network_time_sync_add_http_url": "Aggiungi URL HTTP",
"network_time_sync_add_ntp_server": "Aggiungi server NTP",
"network_time_sync_config_header": "Configurazione della sincronizzazione dell'ora",
"network_time_sync_custom": "Costume",
"network_time_sync_description": "Configurare le impostazioni di sincronizzazione dell'ora",
"network_time_sync_disable_fallback_description": "Impedisci l'uso di server integrati per la sincronizzazione dell'ora",
"network_time_sync_disable_fallback_title": "Disabilita il fallback",
"network_time_sync_http_only": "Solo HTTP",
"network_time_sync_http_url_invalid": "URL di sincronizzazione dell'ora HTTP non valido",
"network_time_sync_http_url_required": "URL di sincronizzazione temporale HTTP richiesto con l'origine URL HTTP fornita dall'utente",
"network_time_sync_no_matching_sources": "Nessuna fonte corrispondente trovata",
"network_time_sync_ntp_and_http": "NTP e HTTP",
"network_time_sync_ntp_only": "Solo NTP",
"network_time_sync_ntp_server_invalid": "Server NTP non valido",
"network_time_sync_ntp_server_required": "È richiesto il server di sincronizzazione dell'ora NTP con l'origine dei server NTP forniti dall'utente",
"network_time_sync_ordering_description": "Priorità delle fonti di sincronizzazione dell'ora.",
"network_time_sync_ordering_required": "È richiesta almeno una fonte di sincronizzazione",
"network_time_sync_ordering_title": "Ordinamento delle origini di sincronizzazione",
"network_time_sync_parallel_description": "Numero di server da interrogare in parallelo",
"network_time_sync_parallel_invalid": "Le query parallele devono essere maggiori di zero",
"network_time_sync_parallel_title": "Domande parallele",
"network_time_sync_select_sources": "Seleziona fonti...",
"network_time_sync_source_builtin_http": "URL HTTP incorporati",
"network_time_sync_source_builtin_ntp": "Server NTP integrati",
"network_time_sync_source_dhcp": "Server DHCP NTP",
"network_time_sync_source_user_http": "URL HTTP forniti dall'utente",
"network_time_sync_source_user_ntp": "Server NTP forniti dall'utente",
"network_time_sync_title": "Sincronizzazione oraria",
"network_time_sync_user_http_urls_label": "URL HTTP forniti dall'utente",
"network_time_sync_user_ntp_servers_label": "Server NTP forniti dall'utente",
"network_title": "Rete",
"never_seen_online": "Mai visto online",
"next": "Avanti",
Expand Down
Loading