fix(settings): reject IPv6 reflectors
Build / build (pull_request) Failing after 4s
DevSkim / DevSkim (pull_request) Failing after 1m21s
rust-clippy analyze / Run rust-clippy analyzing (pull_request) Failing after 1m36s

This commit is contained in:
Nils Andreas Svee committed 2026-09-25 17:13:09 +07:00
1 parent 8fb051d48f
commit 6b281ba3d9
1 file changed
+4 -1
+4 -1
View File
@@ -192,7 +192,10 @@ impl Settings {
})?; })?;
match (record.ip_version, record.reflector_ip) { match (record.ip_version, record.reflector_ip) {
(4, IpAddr::V4(_)) | (6, IpAddr::V6(_)) => {} (4, IpAddr::V4(_)) => {}
(6, address @ IpAddr::V6(_)) => {
bail!("reflector {address} is IPv6; only IPv4 reflectors are supported");
}
(version, address) => { (version, address) => {
bail!("reflector {address} has inconsistent IP version {version}"); bail!("reflector {address} has inconsistent IP version {version}");
} }