Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 929fb56

Browse files
authoredJun 20, 2024··
Replace test references to ip with netblock.
1 parent 78d7de5 commit 929fb56

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/net/server/tests/integration.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -378,18 +378,18 @@ fn parse_server_config(config: &Config) -> ServerConfig {
378378
// for a classless network block", but we only handle
379379
// an IP address here for now.
380380
// See: https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html?highlight=edns-tcp-keepalive#unbound-conf-access-control
381-
if let Some((ip, action)) =
381+
if let Some((netblock, action)) =
382382
v.split_once(|c: char| c.is_whitespace())
383383
{
384384
match action {
385385
"allow_cookie" => {
386-
if let Ok(ip) = ip.parse() {
386+
if let Ok(netblock) = netblock.parse() {
387387
parsed_config
388388
.cookies
389389
.deny_list
390-
.push(ip);
390+
.push(netblock);
391391
} else {
392-
eprintln!("Ignoring malformed IP address '{ip}' in 'access-control' setting");
392+
eprintln!("Ignoring malformed netblock '{netblock}' in 'access-control' setting");
393393
}
394394
}
395395

0 commit comments

Comments
 (0)
Please sign in to comment.