Bug 851216 - Valid shortened ipv6 notation :: is complaining for not a valid internet-address-list because we have (ret = 0) incase of ":" at the end of ipv6 address
Valid shortened ipv6 notation :: is complaining for not a valid internet-addr...
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: unclassified (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Bug Updates Notification Mailing List
Depends On:
  Show dependency treegraph
Reported: 2012-08-23 10:08 EDT by Rahul Hinduja
Modified: 2015-12-03 12:21 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-12-03 12:21:28 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rahul Hinduja 2012-08-23 10:08:14 EDT
Description of problem:

[Note writing this bug against unclassified as cli is not listed in component]

In IPv6 address format, 00:00:00:00:00:00:00:00 is the valid ipv6 address which is best represented as "::". Setting the "00:00:00:00:00:00:00:00" ipv6 address for authentication of volume is successful but not "::". It complains that "::" is not a valid-internet address

Log Snippet:

[2012-08-23 17:39:42.565152] E [options.c:499:xlator_option_validate_addr_list] 0-vol1-server: option auth.addr./root/rahul/a.allow ::: '::' is not a valid internet-address-list
[2012-08-23 17:39:42.565212] W [options.c:773:xl_opt_validate] 0-vol1-server: validate of auth.addr./root/rahul/a.allow returned -1
[2012-08-23 17:39:42.565252] I [options.c:878:xlator_validate_rec] 0-vol1-server: option auth.addr./root/rahul/a.allow ::: '::' is not a valid internet-address-list

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

[root@unused ~]# gluster --version
glusterfs 3.3.0rhs built on Aug 17 2012 07:06:59
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2011 Gluster Inc. <http://www.gluster.com>
You may redistribute copies of GlusterFS under the terms of the GNU General Public License.
[root@unused ~]# 

How reproducible:

Steps to Reproduce:
1. Set the volume authentication option as "gluster volume set vol1 auth.allow ::"
2. It reports the error
Actual results:

Console Snippet:

[root@unused ~]# gluster volume set vol1 auth.allow 0:0:0:0:0:0:0:0
Set volume successful
[root@unused ~]# gluster volume set vol1 auth.allow ::
option auth.addr./root/rahul/a.allow ::: '::' is not a valid internet-address-list
Set volume unsuccessful
[root@unused ~]# 

Expected results:

It should be successful as

[root@unused ~]# gluster volume set vol1 auth.allow ::
Set volume successful
[root@unused ~]# 

Additional info:

Tried following valid shortened notation with "::"

1. ::1 is successful
2. 1:: is unsuccessful
3. 1::1 is successful
4. :: is unsuccessful

I think following code in common-utils.c is causing the issue

valid_ipv6_address (char *address, int length, gf_boolean_t wildcard_acc)

        /* Check for compressed form */
        if (length <= 0 || tmp[length - 1] == ':') {
                ret = 0;
                goto out;

In the above code we are checking tmp[length - 1], so in case of :: ":" is at the end of the array. Hence it fails for 1:: and ::
Comment 2 Vivek Agarwal 2015-12-03 12:21:28 EST
Thank you for submitting this issue for consideration in Red Hat Gluster Storage. The release for which you requested us to review, is now End of Life. Please See https://access.redhat.com/support/policy/updates/rhs/

If you can reproduce this bug against a currently maintained version of Red Hat Gluster Storage, please feel free to file a new report against the current release.

Note You need to log in before you can comment on or make changes to this bug.