Bug 1389089

Summary: IP addresses with 0 as the first octet are treated as valid
Product: Red Hat Quickstart Cloud Installer Reporter: James Olin Oden <joden>
Component: fusor-installerAssignee: Jason Montleon <jmontleo>
Status: CLOSED ERRATA QA Contact: James Olin Oden <joden>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.1CC: jkim, jmontleo, qci-bugzillas
Target Milestone: ---Keywords: Triaged
Target Release: 1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-28 01:40:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description James Olin Oden 2016-10-26 20:20:46 UTC
Description of problem:
If you enter an IP address like:

   0.168.175.10

And then proceed with values shown, it will accept this address and it will ultimately get bound to the specified interface.

However in section 3.2.1.3 of RFC 1122 (https://tools.ietf.org/html/rfc1122) it states that addresses like these are reserved for finding out the full address of the hosts IP (i.e. its network portion).   Here is an excerpt:

    b)  { 0, <Host-number> }

        Specified host on this network.  It MUST NOT be sent,
        except as a source address as part of an initialization
        procedure by which the host learns its full IP address.

It should also be noted, that even though the address was indeed bound to the interface ssh complains it is an invalid argument:

   # ssh 0.168.175.10
   ssh: connect to host 0.168.175.10 port 22: Invalid argument

Version-Release number of selected component (if applicable):
QCI-1.1-RHEL-7-20161024.t.0

How reproducible:
every time

Steps to Reproduce:
1. assign an IP address with an initial octet of 0 in fusor installer
2. apply the changes

Actual results:
They are applied without error.

Expected results:
The address to be caught as an invalid IP.

Comment 2 Jason Montleon 2016-12-05 16:46:49 UTC
https://github.com/fusor/fusor-installer/pull/103

Comment 3 James Olin Oden 2016-12-07 20:02:25 UTC
Verified with QCI-1.1-RHEL-7-20161206.t.0

Comment 6 errata-xmlrpc 2017-02-28 01:40:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:0335