RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 998929 - Change mode in IP address is not accepting it's format
Summary: Change mode in IP address is not accepting it's format
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: beta
: 7.0
Assignee: Jirka Klimes
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-20 11:06 UTC by Vladimir Benes
Modified: 2016-01-04 06:03 UTC (History)
4 users (show)

Fixed In Version: NetworkManager-0.9.9.0-12.git20130913.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:44:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Vladimir Benes 2013-08-20 11:06:26 UTC
Description of problem:
when I set ipv4.addresses to 1.1.1.2/24 1.1.1.1 and then go to ipv4 object and then to addresses object. 

after submitting change, I get:
Edit 'addresses' value: { ip = 1.1.1.2/24, gw = 1.1.1.1 }

so I press enter as no change or do small change wherever and then press enter and I get this:
Error: failed to set 'addresses' property: '{ ip = 1.1.1.2/24' is not valid (use ip[/prefix] [gateway])


Version-Release number of selected component (if applicable):
NetworkManager-0.9.9.0-9.git20130807.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1.set ipv4.adresses
2.goto ipv4; goto addresses
3.change
4.press enter as no change

Actual results:
error

Expected results:
no error, both modes should be acceptable

Additional info:

Comment 2 Jirka Klimes 2013-09-12 09:51:18 UTC
addresses and routes (and some other properties) differ in value format that is presented while printing and what user actually types.
I have modified the 'change' command to present the value to the user in a format that nmcli will accept.

Please review the change in upstream jklimes/rh998929-in-out-formats branch.

Comment 3 Dan Winship 2013-09-12 17:25:06 UTC
the use of g_regex_split() here is a little confusing, since that's intended to be used when you care about the strings in between the matches, not the matches themselves (eg, splitting on ",\\s*"). But I guess it's less code than the version with g_regex_match() would be, so...

It looks like get_property_val() leaks the unconverted property value when it does a conversion. Other than that, everything looks right.

Comment 4 Jirka Klimes 2013-09-13 10:07:08 UTC
(In reply to Dan Winship from comment #3)
> the use of g_regex_split() here is a little confusing, since that's intended
> to be used when you care about the strings in between the matches, not the
> matches themselves (eg, splitting on ",\\s*"). But I guess it's less code
> than the version with g_regex_match() would be, so...
Yeah, it might be misleading for the first look, but I like how it allows extracting the data quite easily.

> It looks like get_property_val() leaks the unconverted property value when
> it does a conversion. Other than that, everything looks right.
Fixed.

Pushed to upstream master: 1f6e1fbc62a6db33dd681faf2b9d8e51093eed2c

Comment 7 Vladimir Benes 2014-03-31 13:18:30 UTC
both enter and backspace + number works well. Covered by both manual and automated tests.

Comment 8 Ludek Smid 2014-06-13 11:44:50 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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