From 7c18df0a6f2637d65e52af441738b84037b84a91 Mon Sep 17 00:00:00 2001 From: lbl8603 <49143209+lbl8603@users.noreply.github.com> Date: Thu, 27 Jun 2024 21:59:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E8=80=83std=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E5=85=AC=E7=BD=91IP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnt/src/channel/punch.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/vnt/src/channel/punch.rs b/vnt/src/channel/punch.rs index 25e778d..fc79063 100644 --- a/vnt/src/channel/punch.rs +++ b/vnt/src/channel/punch.rs @@ -114,12 +114,7 @@ impl NatInfo { *public_port = port; } } - if !ip.is_multicast() - && !ip.is_broadcast() - && !ip.is_unspecified() - && !ip.is_loopback() - && !ip.is_private() - { + if crate::nat::is_ipv4_global(&ip) { if !self.public_ips.contains(&ip) { self.public_ips.push(ip); updated = true;