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.

Bug 1789482

Summary: [RFE] NM should provide a way to automatically choose interface's IP address as source when creating iproute2 rule
Product: Red Hat Enterprise Linux 8 Reporter: Mai Ling <mailinglists35>
Component: NetworkManagerAssignee: NetworkManager Development Team <nm-team>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.4CC: aloughla, atragler, bgalvani, fge, lrintel, pasik, rkhan, sukulkar, thaller, till
Target Milestone: rcKeywords: FutureFeature
Target Release: 8.0Flags: pm-rhel: mirror+
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: 2021-04-01 07:55:12 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:

Description Mai Ling 2020-01-09 16:53:48 UTC
Description of problem:

The key "ipv4.routing-rules" creates an iproute2 rule with user specified IP address/network as source, or with source 0.0.0.0/0 if IP address/network is not mentioned.

However, I would like to be able to automatically add the interface IP address as the source. This is also currently impossible if the interface is configured via DHCP, as you would not know what IP address will get before the connection is up.

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

How reproducible:
always

Steps to Reproduce:

1a. nmcli connection modify conn1 ipv4.routing-rules "priority 30000 table 200" ipv4.method auto; nmcli up conn1

1b. nmcli connection modify conn1 ipv4.routing-rules "priority 30000 table 200 from 192.168.1.1/32" ipv4.method auto; nmcli up conn1

Actual results:
1a.
$ ip -N ru sh prio 30000
30000:	from all lookup 200

1b.
$ ip -N ru sh prio 30000
30000:	from 192.168.1.1 lookup 200


Expected results:
nmcli connecton modify conn1 ipv4.routing-rules-use-interface-ip yes
nmcli connection modify conn1 ipv4.routing-rules "priority 30000 table 200" ipv4.method auto
nmcli up conn1

(connection receives an IP over dhcp...)

$ ip -4 a sh dev wlp1s0|grep inet|awk '{print $2}'
192.168.137.187/24

$ ip -N ru sh prio 30000
30000:	from 192.168.137.187 lookup 200


Additional info:

Comment 3 Gris Ge 2021-03-03 02:50:44 UTC
Hi Mai Ling,

This might be done by dispatch script of NetworkManager.
Could you give it a go to see whether it fit your needs?

Thank you!

Comment 4 Till Maas 2021-04-01 07:55:12 UTC
Thank you for your report Mai Ling. Since we did not get any feedback we are assuming the issue is addressed by using a dispatcher script.

Comment 5 Red Hat Bugzilla 2023-09-15 00:20:36 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days