about summary refs log tree commit diff
path: root/libnm-core/nm-setting-ovs-patch.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-core/nm-setting-ovs-patch.c')
-rw-r--r--libnm-core/nm-setting-ovs-patch.c14
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