diff --git a/clients/common/settings-docs.h.in b/clients/common/settings-docs.h.in index 2ae2377813..a937f4ba6d 100644 --- a/clients/common/settings-docs.h.in +++ b/clients/common/settings-docs.h.in @@ -290,7 +290,7 @@ #define DESCRIBE_DOC_NM_SETTING_OVS_BRIDGE_STP_ENABLE N_("Enable or disable STP.") #define DESCRIBE_DOC_NM_SETTING_OVS_DPDK_DEVARGS N_("Open vSwitch DPDK device arguments.") #define DESCRIBE_DOC_NM_SETTING_OVS_INTERFACE_TYPE N_("The interface type. Either \"internal\", \"system\", \"patch\", \"dpdk\", or empty.") -#define DESCRIBE_DOC_NM_SETTING_OVS_PATCH_PEER N_("Specifies the unicast destination IP address of a remote Open vSwitch bridge port to connect to.") +#define DESCRIBE_DOC_NM_SETTING_OVS_PATCH_PEER N_("Specifies the name of the interface for the other side of the patch. The patch on the other side must also set this interface as peer.") #define DESCRIBE_DOC_NM_SETTING_OVS_PORT_BOND_DOWNDELAY N_("The time port must be inactive in order to be considered down.") #define DESCRIBE_DOC_NM_SETTING_OVS_PORT_BOND_MODE N_("Bonding mode. One of \"active-backup\", \"balance-slb\", or \"balance-tcp\".") #define DESCRIBE_DOC_NM_SETTING_OVS_PORT_BOND_UPDELAY N_("The time port must be active before it starts forwarding traffic.") diff --git a/libnm-core/nm-setting-ovs-patch.c b/libnm-core/nm-setting-ovs-patch.c index 6a9c9f5681..5135e6ae23 100644 --- a/libnm-core/nm-setting-ovs-patch.c +++ b/libnm-core/nm-setting-ovs-patch.c @@ -81,13 +81,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return FALSE; } - if ( !nm_utils_ipaddr_is_valid (AF_INET, self->peer) - && !nm_utils_ipaddr_is_valid (AF_INET6, self->peer)) { - g_set_error (error, - NM_CONNECTION_ERROR, - NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("'%s' is not a valid IP address"), - self->peer); + if (!nm_utils_ifname_valid (self->peer, NMU_IFACE_OVS, error)) { g_prefix_error (error, "%s.%s: ", NM_SETTING_OVS_PATCH_SETTING_NAME, NM_SETTING_OVS_PATCH_PEER); @@ -179,8 +173,8 @@ nm_setting_ovs_patch_class_init (NMSettingOvsPatchClass *klass) /** * NMSettingOvsPatch:peer: * - * Specifies the unicast destination IP address of a remote Open vSwitch - * bridge port to connect to. + * Specifies the name of the interface for the other side of the patch. + * The patch on the other side must also set this interface as peer. * * Since: 1.10 **/