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: