Commit df9d2c9b authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Merge branch 'cherry-pick-8f306689' into 'release-20.4'

release-20.4:Backport!5396

See merge request !5399
parents 6e4be720 528d53eb
......@@ -746,6 +746,8 @@ class RDParameter(Parameter):
'100000:500'
>>> RDParameter().clean("100000L:100")
'100000:100'
>>> RDParameter().clean("15.37977:999")
'1021017:999'
"""
try:
left, right = value.split(":", 1)
......@@ -754,6 +756,13 @@ class RDParameter(Parameter):
self.raise_error(value)
if right < 0:
self.raise_error(value)
if "." in left and left.count(".") == 1:
# Type 2 notation
hleft, lleft = left.split(".")
try:
left = str((int(hleft) << 16) + int(lleft))
except ValueError:
self.raise_error(value)
if "." in left:
# IP:N
try:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment