nmcli: accept certain IP settings on port connections

Commit bb850fda0e ('nmcli: connection: process port-type, type
and controller first') started correctly rejecting IP configuration
on port connections.

However, previously nmcli would accept IP parameters for ports when
using a specific parameters order. To avoid breaking user scripts that
may have relied on this behavior, introduce a backward compatibility
quirk.

Specifically, nmcli accepts a disabled/ignore IP method on a port
connection. For any other IP setting on a port connection, a specific
error message is now shown.

https://issues.redhat.com/browse/RHEL-90756
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2227
This commit is contained in:
Beniamino Galvani
2025-06-23 10:49:21 +02:00
parent 25a5fd7503
commit 165e5df6e0
4 changed files with 234 additions and 13 deletions

View File

@@ -613,6 +613,7 @@ class NmUtil:
if t not in [
NM.SETTING_GSM_SETTING_NAME,
NM.SETTING_MACVLAN_SETTING_NAME,
NM.SETTING_OVS_INTERFACE_SETTING_NAME,
NM.SETTING_VLAN_SETTING_NAME,
NM.SETTING_VPN_SETTING_NAME,
NM.SETTING_WIMAX_SETTING_NAME,