diff --git a/mailx-12.5-ipv6.dif b/mailx-12.5-ipv6.dif index 63e2c89..f46c825 100644 --- a/mailx-12.5-ipv6.dif +++ b/mailx-12.5-ipv6.dif @@ -10,21 +10,23 @@ # # Binaries are stripped with this command after installation. --- fio.c -+++ fio.c 2013-12-03 08:55:19.158236784 +0000 -@@ -1024,6 +1024,16 @@ sopen(const char *xserver, struct sock * ++++ fio.c 2013-12-04 07:46:41.302735482 +0000 +@@ -1023,7 +1023,17 @@ sopen(const char *xserver, struct sock * char *cp; char *server = (char *)xserver; -+#ifdef HAVE_IPv6_FUNCS -+ if ((cp = strchr(server, ']')) != NULL) { +- if ((cp = strchr(server, ':')) != NULL) { ++ if (*server == '[' && (cp = strchr(server, ']')) != NULL) { + if (cp[1] == ':') { + portstr = &cp[2]; -+ server = salloc(cp+1 - xserver+1); -+ memcpy(server, xserver, cp+1 - xserver); -+ server[cp+1 - xserver] = '\0'; ++#ifndef HAVE_IPv6_FUNCS ++ port = strtol(portstr, NULL, 10); ++#endif /* HAVE_IPv6_FUNCS */ + } -+ } else -+#endif /* HAVE_IPv6_FUNCS */ - if ((cp = strchr(server, ':')) != NULL) { ++ server = salloc(cp - xserver); ++ memcpy(server, xserver+1, cp - xserver - 1); ++ server[cp - xserver - 1] = '\0'; ++ } else if ((cp = strchr(server, ':')) != NULL) { portstr = &cp[1]; #ifndef HAVE_IPv6_FUNCS + port = strtol(portstr, NULL, 10); diff --git a/mailx.changes b/mailx.changes index 49737d5..40fbbe4 100644 --- a/mailx.changes +++ b/mailx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Dec 4 08:54:21 UTC 2013 - werner@suse.de + +- Crop off the brackets of an ipv6 addresse if found (bnc#853246) + ------------------------------------------------------------------- Tue Dec 3 09:06:50 UTC 2013 - werner@suse.de