fix(settings): reject IPv6 reflectors

This commit is contained in:
Nils Andreas Svee committed 2026-09-25 17:20:07 +07:00
1 parent 4c9fe15201
commit 5b0854920d
1 file changed
+4 -1
+4 -1
View File
@@ -192,7 +192,10 @@ impl Settings {
})?;
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) => {
bail!("reflector {address} has inconsistent IP version {version}");
}