ipv6转ipv4判断

This commit is contained in:
lbl8603
2024-06-29 17:26:52 +08:00
parent 31f0213fc5
commit 5e56064ec6
+1 -1
View File
@@ -265,7 +265,7 @@ impl Punch {
self.external_route.route(ip).is_none() && device_info.not_in_network(*ip)
});
nat_info.ipv6.filter(|ip| {
if let Some(ip) = ip.to_ipv4_mapped() {
if let Some(ip) = ip.to_ipv4() {
self.external_route.route(&ip).is_none()
} else {
true