fix ipv6 handling for remotes/sync jobs
* add square brackets to ipv6 adresses in BackupRepository if they not already have some (we save them without in the remote config) * in get_pull_parameters, we now create a BackupRepository first and use those values (which does the [] mapping), this also has the advantage that we have one place less were we hardcode 8007 as port * in the ui, add square brackets for ipv6 adresses for remotes Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
7b8aa893fa
commit
38d4675921
@ -28,6 +28,12 @@ pub struct BackupRepository {
|
||||
impl BackupRepository {
|
||||
|
||||
pub fn new(user: Option<Userid>, host: Option<String>, port: Option<u16>, store: String) -> Self {
|
||||
let host = match host {
|
||||
Some(host) if (IP_V6_REGEX.regex_obj)().is_match(&host) => {
|
||||
Some(format!("[{}]", host))
|
||||
},
|
||||
other => other,
|
||||
};
|
||||
Self { user, host, port, store }
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user