Dr. Werner Fink 2013-12-04 08:55:19 +00:00 committed by Git OBS Bridge
parent 7ae77954d5
commit e6053810c1
2 changed files with 17 additions and 10 deletions

View File

@ -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);

View File

@ -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