Browse Source

Log error on CIDR parse failure in whitelist matching Go's glog.Errorf

rust-volume-server
Chris Lu 2 days ago
parent
commit
7bb8bce77d
  1. 2
      seaweed-volume/src/security.rs

2
seaweed-volume/src/security.rs

@ -156,6 +156,8 @@ impl Guard {
// CIDR range // CIDR range
if let Some((ip, prefix)) = parse_cidr(entry) { if let Some((ip, prefix)) = parse_cidr(entry) {
self.whitelist_cidrs.push((ip, prefix)); self.whitelist_cidrs.push((ip, prefix));
} else {
tracing::error!("Parse CIDR {} in whitelist failed", entry);
} }
} else { } else {
// Exact IP/hostname // Exact IP/hostname

Loading…
Cancel
Save