Bug 1336842

Summary: ipcalc has not output in redhat/centos. Woking fine in fedora 21-23 and debian 7-8
Product: Red Hat Enterprise Linux 7 Reporter: Ricardo Rodriguez <rrvzero>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.2CC: jscotka
Target Milestone: rc   
Target Release: 7.2   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
redhat 7.2, 7.1,6.7 5.5 centos 7.2, 7.1, 6.7 5.5
Last Closed: 2016-06-15 12:50:19 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:
Embargoed:
Attachments:
Description Flags
all outputs in one image redha/centos/fedora/debian none

Description Ricardo Rodriguez 2016-05-17 14:40:22 UTC
Description of problem: ipcalc has no output as fedora or debian because it is in a package apart from the initscript and in redhat/centos it is inside of the initscript and IPv6 validation fails in ipcalc redhat/centos.


Version-Release number of selected component (if applicable):


How reproducible: 

Steps to Reproduce:
1. install from the beginning use ipcalc 
2. ipcalc 192.168.1.1 = no result
3. ipcalc -6 -p 2001:13f0::1/32 = ipcalc: unable to show setting for IPv6

Actual results:

ipcalc 192.168.1.1 does not show any output.
ipcalc 192.168.1.0/24 does not show any output.
ipcalc -6 -p 2001:13f0::1/32
ipcalc: unable to show setting for IPv6


Expected results:


in fedora 23:
ipcalc 192.168.1.1
Address:        192.168.1.1
Network:        192.168.1.0/24
Address space:  Private Use
Address class:  Class C
Netmask:        255.255.255.0 = 24
Broadcast:      192.168.1.255

HostMin:        192.168.1.1
HostMax:        192.168.1.254
Hosts/Net:      254

ipcalc -6 -p 2001:13f0::1/32
  PREFIX=32


in debian:

Address:   192.168.1.1          11000000.10101000.00000001. 00000001
Netmask:   255.255.255.0 = 24   11111111.11111111.11111111. 00000000
Wildcard:  0.0.0.255            00000000.00000000.00000000. 11111111
=>
Network:   192.168.1.0/24       11000000.10101000.00000001. 00000000
HostMin:   192.168.1.1          11000000.10101000.00000001. 00000001
HostMax:   192.168.1.254        11000000.10101000.00000001. 11111110
Broadcast: 192.168.1.255        11000000.10101000.00000001. 11111111
Hosts/Net: 254                   Class C, Private Internet



Additional info:

Comment 2 Lukáš Nykrýn 2016-05-17 15:08:07 UTC
The ipcalc from initscripts was only meant to be used inside scripts, so the fancy output for such use cases does not make sense. In the fedora we have decided to split ipcalc to its own project and the current developer introduced couple of new nice features. I would rather play it safe here and do not backport those features to rhel.

But the ipcalc -6 -p 2001:13f0::1/32 look as a bug and we should fix it.

Comment 3 Ricardo Rodriguez 2016-05-17 15:20:54 UTC
Created attachment 1158367 [details]
all outputs in one image redha/centos/fedora/debian

Comment 5 Lukáš Nykrýn 2016-06-13 13:29:13 UTC
Hmm, it is not a bug, we just don't support that :-(
    if (familyIPv6 &&
        (showBroadcast || showNetmask || showNetwork || showPrefix)) {
        if (!beSilent) {
            fprintf(stderr, "ipcalc: unable to show setting for IPv6\n");
        }
        return 1;
    }

To be honest I don't want to implement this just for rhel7, since we will have Nikos' ipcalc in the future. So unless you have strong objection I will close this as wontfix, since initscripts are now mostly in maintanance mode and we don't implement new features. Or someone sends a patch :-)

Comment 6 Ricardo Rodriguez 2016-06-15 12:29:40 UTC
Ok, this ipcalc package for Redhat/centos/scientific will be available in 3, 6, 9 or 12 months from now? 

My dear Lukas you can mark the bug as a wontfix case.