From babff882c0794fab81665744bcc1aa155b90eed2 Mon Sep 17 00:00:00 2001 From: Dharini Chandrasekar Date: Fri, 19 Aug 2016 18:34:18 +0000 Subject: Fixing HostName and adding support for HostAddress When config options in different projects use IPOpt as the opt's type, it restricts operators to only IP addresses. When the opt is set to HostnameOpt type, currently even an incomplete or invalid IP passes as a valid hostname. Also, currently HostnameOpt does not make sure that there is a presense of at least one non-numeric character in the provided host name. According to RFC 1123, (https://tools.ietf.org/html/rfc1123), a valid host name can never have the dotted-decimal form #.#.#.#, since at least the highest-level component label will be alphabetic. This patch fixes the existing Hostname Opt to abide by the stated RFC and also adds a new opt type that would enable operators to provide either a hostname or an IP and at the same time perform checks on both IPOpt type and HostnameOpt type, by setting opt type to "HostAddressOpt" type. This would ensure that an invalid IP does not pass as a valid hostname and at the same time retains the rules required to be followed for the validation of an acceptable hostname. Change-Id: I77bdb64b7e6e56ce761d76696bc4448a9bd325eb Closes-Bug: #1619044 Closes-Bug: #1615028 --- releasenotes/notes/add-HostAddressOpt-6e7e2afe7c7863cb.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 releasenotes/notes/add-HostAddressOpt-6e7e2afe7c7863cb.yaml (limited to 'releasenotes') diff --git a/releasenotes/notes/add-HostAddressOpt-6e7e2afe7c7863cb.yaml b/releasenotes/notes/add-HostAddressOpt-6e7e2afe7c7863cb.yaml new file mode 100644 index 0000000..576f464 --- /dev/null +++ b/releasenotes/notes/add-HostAddressOpt-6e7e2afe7c7863cb.yaml @@ -0,0 +1,13 @@ +--- +prelude: > + Configuration option type of ``HostAddressOpt`` added to accept and + validate both IP addresses and hostnames. Please refer to the + ``features`` section for more information. + +features: + - Configuration option type of ``HostAddressOpt`` added to accept both + valid IP address (IPv4 and IPv6) values as well as hostnames. + The ``HostAddressOpt`` will accept both IPv4 and IPv6 addresses + and ensure that strict checks are performed on the IP versions. + This option type will also accept and accurately validate hostnames + ensuring that no invalid IP passes as a valid hostname. -- cgit v1.2.1