From ccd4f3ada48df03a00a06204a2bf7c374a17a3de Mon Sep 17 00:00:00 2001 From: jiangweidong Date: Fri, 22 Mar 2024 17:19:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20tcpdump=E6=83=B3=E6=8D=95=E6=8D=89?= =?UTF-8?q?=E6=89=80=E6=9C=89ip=E6=97=B6=EF=BC=8C=E7=A9=BAip=E8=A2=AB?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E6=88=900.0.0.0=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=8D=95=E6=8D=89=E4=B8=8D=E5=88=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/settings/utils/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/settings/utils/common.py b/apps/settings/utils/common.py index 826b19cd8..a7c250ed1 100644 --- a/apps/settings/utils/common.py +++ b/apps/settings/utils/common.py @@ -20,7 +20,8 @@ def get_login_title(): def generate_ips(address_string): def transform(_ip): real_ip, err_msg = lookup_domain(_ip) - return _ip if err_msg else real_ip + return _ip if err_msg or real_ip == '0.0.0.0' else real_ip + # 支持的格式 # 192.168.1.1,192.168.1.2 # 192.168.1.1-12 | 192.168.1.1-192.168.1.12 | 192.168.1.0/30 | 192.168.1.1