Fix logic in validate_vxlan_udp_port
Fix the logic in validate_vxlan_udp_port. According to RFC6056 [1]: * The Well-Known Ports, 0 through 1023. * The Registered Ports, 1024 through 49151 * The Dynamic and/or Private Ports, 49152 through 65535 And RFC7348 [2]: A well-known UDP port (4789) has been assigned by the IANA in the Service Name and Transport Protocol Port Number Registry for VXLAN. So this patch makes sure we either use 4789 or a dynamic port. [1] http://tools.ietf.org/html/rfc6056 [2] https://tools.ietf.org/html/rfc7348 Change-Id: Id96e675f9cb58bb50ae29147c5b470224b15b4d2
This commit is contained in:
parent
4b32158c1e
commit
bab3cbf0c8
@ -25,7 +25,7 @@ module Puppet::Parser::Functions
|
||||
|
||||
# check if port is either default value or one of the private ports
|
||||
# according to http://tools.ietf.org/html/rfc6056
|
||||
if value != 4789 or (49151 >= value and value > 65535)
|
||||
if value != 4789 and (49151 >= value or value > 65535)
|
||||
raise Puppet::Error, "vxlan udp port is invalid."
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user