Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.

Commit 966ce66

Browse files
authored
Merge pull request #6 from burbon/master
Allow ip subdomain part to be prefixed with dash
2 parents b028209 + 04772d4 commit 966ce66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def handle_self(self, name):
146146

147147
def handle_subdomains(self, qname):
148148
subdomain = qname[0:qname.find(self.domain) - 1]
149-
match = re.findall('^(?:.+\.)?(\d{1,3}[-.]\d{1,3}[-.]\d{1,3}[-.]\d{1,3})$', subdomain)
149+
match = re.findall('^(?:.+[-.])?(\d{1,3}[-.]\d{1,3}[-.]\d{1,3}[-.]\d{1,3})$', subdomain)
150150

151151
if not match:
152152
if DEBUG:

0 commit comments

Comments
 (0)