mirror of
https://github.com/thegeeklab/prometheus-pve-sd.git
synced 2024-06-02 07:59:40 +02:00
Fix ipv6 regex
This commit is contained in:
parent
ea99461214
commit
d93ea2f4d5
|
@ -98,7 +98,7 @@ class Discovery():
|
|||
sources = [config["net0"]]
|
||||
|
||||
for s in sources:
|
||||
find = re.search(r"ip=(\d*:\d*:\d*:\d*:\d*:\d*)", str(s))
|
||||
find = re.search(r"ip=(([a-fA-F0-9]{0,4}:{0,2}){0,7}:[0-9a-fA-F]{1,4})", str(s))
|
||||
if find and find.group(1):
|
||||
ipv6_address = find.group(1)
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue
Block a user