Port validation should include 65535

Python's range test in inclusive to exclusive.
Update 65535 to 65536.

bug 956683

Change-Id: I1e22c045ab659c8a303e9fe3823236fe3e114feb
This commit is contained in:
Greg Althaus
2012-03-15 21:25:06 -07:00
parent f00f177068
commit fd3bb97a8a
2 changed files with 2 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ Emma Steimann <emmasteimann@gmail.com>
Ewan Mellor <ewan.mellor@citrix.com>
Gabriel Hurley <gabriel@strikeawe.com>
Ghe Rivero <ghe@debian.org>
Greg Althaus <galthaus@austin.rr.com>
Hengqing Hu <hudayou@hotmail.com>
Ivan Kolodyazhny <e0ne@e0ne.info>
Jake Dahn <jake@ansolabs.com>

View File

@@ -31,7 +31,7 @@ validate_ipv4_cidr = validators.RegexValidator(ipv4_cidr_re)
def validate_port_range(port):
if port not in range(-1, 65535):
if port not in range(-1, 65536):
raise ValidationError("Not a valid port number")