Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
nmcli command to add ipv4.gateway does not work when DEFROUTE=no and throws no error
Version-Release number of selected component (if applicable):
RHEL 7.5
3.10.0-862.14.4.el7.x86_64
NetworkManager-1.10.2-16.el7_5.x86_64
How reproducible:
very
Steps to Reproduce:
1. create an interface (ifcfg file manually or with nmcli)
2. nmcli connection modify vlan1006 ipv4.never-default yes
3. nmcli con mod vlan1006 ipv4.gateway 192.168.100.1
Actual results:
No output error is shown and ipv4 gateway is not added. Troubleshooting showed you had to change never-default to "no" for the gateway to be added.
Expected results:
Customer would expect this to throw an error. Not sure if this is a bug or RFE. I am explaining to customer that likely this is because of how default routes used to work with /etc/sysconfig/gateway and setting gateway with DEFROUTE=yes however this is deprecated so it does make sense this should throw an error.
Additional info:
now nmcli is changed.
when you set ipv4.gateway (ipv6.gateway) on the command line, then it also will set ipvx.never-default to no.
that means,
nmcli connection modify "$PROFILE" ipv4.never-default yes ipv4.gateway 192.168.1.1
results in never-default "no"... because the latter setting of gateway wins. At first that might seem odd, but in general, if you specify an option (or overlapping options like in this case) multiple times, then the last one wins. That is now fixed.
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 (Moderate: NetworkManager security and bug fix update), 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/RHSA-2020:4003