[gdm/gnome-2-32] Strip ::ffff: in front of IPv4 addresses This fixes XDMCP using IPv4 on IPv6-enabled networks.
- From: Josselin Mouette <jmouette src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/gnome-2-32] Strip ::ffff: in front of IPv4 addresses This fixes XDMCP using IPv4 on IPv6-enabled networks.
- Date: Fri, 17 Dec 2010 19:46:24 +0000 (UTC)
commit 629f347fcb90e56694f6eaa366cdeec1afa7ead9
Author: Josselin Mouette <joss debian org>
Date: Fri Dec 17 20:43:36 2010 +0100
Strip ::ffff: in front of IPv4 addresses
This fixes XDMCP using IPv4 on IPv6-enabled networks.
common/gdm-address.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/common/gdm-address.c b/common/gdm-address.c
index 0ed5e8d..edc6d3c 100644
--- a/common/gdm-address.c
+++ b/common/gdm-address.c
@@ -324,10 +324,18 @@ gdm_address_get_numeric_info (GdmAddress *address,
}
if (servp != NULL) {
- *servp = g_strdup (serv);
+ if (g_str_has_prefix (serv, "::ffff:")) {
+ *servp = g_strdup (serv + 7);
+ } else {
+ *servp = g_strdup (serv);
+ }
}
if (hostp != NULL) {
- *hostp = g_strdup (host);
+ if (g_str_has_prefix (host, "::ffff:")) {
+ *hostp = g_strdup (host + 7);
+ } else {
+ *hostp = g_strdup (host);
+ }
}
return ret;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]