Blame SOURCES/rh1103702-tui-ipv6-addr-crash-fix.patch

708502
From 5378d7929eac07d55d5aa128ed21d6c03b14acf2 Mon Sep 17 00:00:00 2001
708502
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@redhat.com>
708502
Date: Mon, 2 Jun 2014 14:32:18 +0200
708502
Subject: [PATCH 1/2] tui: fix a crash when editing an IPv6 address (rh
708502
 #1103702)
708502
MIME-Version: 1.0
708502
Content-Type: text/plain; charset=UTF-8
708502
Content-Transfer-Encoding: 8bit
708502
708502
https://bugzilla.redhat.com/show_bug.cgi?id=1103702
708502
708502
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
708502
---
708502
 tui/nm-editor-bindings.c | 2 +-
708502
 1 file changed, 1 insertion(+), 1 deletion(-)
708502
708502
diff --git a/tui/nm-editor-bindings.c b/tui/nm-editor-bindings.c
708502
index 44c9ec9..58346cd 100644
708502
--- a/tui/nm-editor-bindings.c
708502
+++ b/tui/nm-editor-bindings.c
708502
@@ -671,7 +671,7 @@ ip6_addresses_with_prefix_from_strv (GBinding     *binding,
708502
 	              NULL);
708502
 
708502
 	for (i = 0; strings[i]; i++) {
708502
-		if (i > addrs->len) {
708502
+		if (i >= addrs->len) {
708502
 			addr = g_value_array_new (3);
708502
 
708502
 			g_value_init (&val, DBUS_TYPE_G_UCHAR_ARRAY);
708502
-- 
708502
1.7.11.7
708502
708502
708502
From d7b8aeea335498771bc66faae0cbd938b02ce84a Mon Sep 17 00:00:00 2001
708502
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@redhat.com>
708502
Date: Mon, 2 Jun 2014 14:36:16 +0200
708502
Subject: [PATCH 2/2] tui: use 128 as the default prefix for IPv6 addresses
708502
MIME-Version: 1.0
708502
Content-Type: text/plain; charset=UTF-8
708502
Content-Transfer-Encoding: 8bit
708502
708502
708502
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
708502
---
708502
 tui/nm-editor-bindings.c | 8 ++++++--
708502
 1 file changed, 6 insertions(+), 2 deletions(-)
708502
708502
diff --git a/tui/nm-editor-bindings.c b/tui/nm-editor-bindings.c
708502
index 58346cd..7f76f14 100644
708502
--- a/tui/nm-editor-bindings.c
708502
+++ b/tui/nm-editor-bindings.c
708502
@@ -104,8 +104,12 @@ ip_string_parse (const char *text,
708502
 		    || (family == AF_INET && *prefix > 32)
708502
 		    || (family == AF_INET6 && *prefix > 128))
708502
 			valid = FALSE;
708502
-	} else if (prefix)
708502
-		*prefix = 32;
708502
+	} else if (prefix) {
708502
+		if (family == AF_INET)
708502
+			*prefix = 32;
708502
+		else
708502
+			*prefix = 128;
708502
+	}
708502
 
708502
 	return valid;
708502
 }
708502
-- 
708502
1.7.11.7
708502