Skip to content

Commit

Permalink
fix: tcpdump想捕捉所有ip时,空ip被解析成0.0.0.0,导致捕捉不到的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
O-Jiangweidong authored and BaiJiangJie committed Mar 22, 2024
1 parent ae7a562 commit ccd4f3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/settings/utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ccd4f3a

Please sign in to comment.