diff options
| author | Iain Lane <iain@orangesquash.org.uk> | 2018-09-24 09:29:55 +0100 |
|---|---|---|
| committer | Iain Lane <iain@orangesquash.org.uk> | 2018-09-24 09:29:55 +0100 |
| commit | e152ec7bf4ba252ff9d3eb13eabd417b931dac9a (patch) | |
| tree | c323cf856ee0bb8e44590670dd54c19653a55748 /libnm-core/nm-setting-ovs-patch.c | |
| parent | ee9c73a923909e23a649407be77e25235d769e25 (diff) | |
Import Upstream version 1.12.2
Diffstat (limited to 'libnm-core/nm-setting-ovs-patch.c')
| -rw-r--r-- | libnm-core/nm-setting-ovs-patch.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/libnm-core/nm-setting-ovs-patch.c b/libnm-core/nm-setting-ovs-patch.c index 9e380914..980015f2 100644 --- a/libnm-core/nm-setting-ovs-patch.c +++ b/libnm-core/nm-setting-ovs-patch.c @@ -28,10 +28,10 @@ /** * SECTION:nm-setting-ovs-patch - * @short_description: Describes connection properties for OpenVSwitch patch interfaces. + * @short_description: Describes connection properties for Open vSwitch patch interfaces. * * The #NMSettingOvsPatch object is a #NMSetting subclass that describes properties - * necessary for OpenVSwitch interfaces of type "patch". + * necessary for Open vSwitch interfaces of type "patch". **/ enum { @@ -83,7 +83,6 @@ static int verify (NMSetting *setting, NMConnection *connection, GError **error) { NMSettingOvsPatch *self = NM_SETTING_OVS_PATCH (setting); - int family = AF_UNSPEC; if (!_nm_connection_verify_required_interface_name (connection, error)) return FALSE; @@ -99,11 +98,8 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return FALSE; } - if (nm_utils_ipaddr_valid (AF_INET, self->peer)) - family = AF_INET; - else if (nm_utils_ipaddr_valid (AF_INET6, self->peer)) - family = AF_INET6; - else { + if ( !nm_utils_ipaddr_valid (AF_INET, self->peer) + && !nm_utils_ipaddr_valid (AF_INET6, self->peer)) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, @@ -199,7 +195,7 @@ nm_setting_ovs_patch_class_init (NMSettingOvsPatchClass *setting_class) /** * NMSettingOvsPatch:peer: * - * Specifies the unicast destination IP address of a remote OpenVSwitch + * Specifies the unicast destination IP address of a remote Open vSwitch * bridge port to connect to. * * Since: 1.10 |