Skip to content

Commit 4f739af

Browse files
author
Max Larsson
committed
Make the local IPs valid
1 parent 92c3206 commit 4f739af

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/iface/interface/tests/ipv4.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,12 +1129,12 @@ fn get_source_address(#[case] medium: Medium) {
11291129
});
11301130

11311131
// List of addresses we test:
1132-
// 172.18.1.255 -> 172.18.1.2
1132+
// 172.18.1.254 -> 172.18.1.2
11331133
// 172.24.24.12 -> 172.24.24.14
1134-
// 172.24.23.255 -> 172.18.1.2
1135-
const UNIQUE_LOCAL_ADDR1: Ipv4Address = Ipv4Address::new(172, 18, 1, 255);
1134+
// 172.24.23.254 -> 172.18.1.2
1135+
const UNIQUE_LOCAL_ADDR1: Ipv4Address = Ipv4Address::new(172, 18, 1, 254);
11361136
const UNIQUE_LOCAL_ADDR2: Ipv4Address = Ipv4Address::new(172, 24, 24, 12);
1137-
const UNIQUE_LOCAL_ADDR3: Ipv4Address = Ipv4Address::new(172, 24, 23, 255);
1137+
const UNIQUE_LOCAL_ADDR3: Ipv4Address = Ipv4Address::new(172, 24, 23, 254);
11381138

11391139
assert_eq!(
11401140
iface.inner.get_source_address_ipv4(&UNIQUE_LOCAL_ADDR1),
@@ -1162,12 +1162,12 @@ fn get_source_address_empty_interface(#[case] medium: Medium) {
11621162
iface.update_ip_addrs(|ips| ips.clear());
11631163

11641164
// List of addresses we test:
1165-
// 172.18.1.255 -> None
1165+
// 172.18.1.254 -> None
11661166
// 172.24.24.12 -> None
1167-
// 172.24.23.255 -> None
1168-
const UNIQUE_LOCAL_ADDR1: Ipv4Address = Ipv4Address::new(172, 18, 1, 255);
1167+
// 172.24.23.254 -> None
1168+
const UNIQUE_LOCAL_ADDR1: Ipv4Address = Ipv4Address::new(172, 18, 1, 254);
11691169
const UNIQUE_LOCAL_ADDR2: Ipv4Address = Ipv4Address::new(172, 24, 24, 12);
1170-
const UNIQUE_LOCAL_ADDR3: Ipv4Address = Ipv4Address::new(172, 24, 23, 255);
1170+
const UNIQUE_LOCAL_ADDR3: Ipv4Address = Ipv4Address::new(172, 24, 23, 254);
11711171

11721172
assert_eq!(
11731173
iface.inner.get_source_address_ipv4(&UNIQUE_LOCAL_ADDR1),

0 commit comments

Comments
 (0)