diff --git a/openssh-7.8p1-scp-ipv6.patch b/openssh-7.8p1-scp-ipv6.patch new file mode 100644 index 0000000..8ae0948 --- /dev/null +++ b/openssh-7.8p1-scp-ipv6.patch @@ -0,0 +1,16 @@ +diff --git a/scp.c b/scp.c +index 60682c68..9344806e 100644 +--- a/scp.c ++++ b/scp.c +@@ -714,7 +714,9 @@ toremote(int argc, char **argv) + addargs(&alist, "%s", host); + addargs(&alist, "%s", cmd); + addargs(&alist, "%s", src); +- addargs(&alist, "%s%s%s:%s", ++ addargs(&alist, ++ /* IPv6 address needs to be enclosed with sqare brackets */ ++ strchr(host, ':') != NULL ? "%s%s[%s]:%s" : "%s%s%s:%s", + tuser ? tuser : "", tuser ? "@" : "", + thost, targ); + if (do_local_cmd(&alist) != 0) + diff --git a/openssh.spec b/openssh.spec index a84b40d..86291ab 100644 --- a/openssh.spec +++ b/openssh.spec @@ -221,6 +221,8 @@ Patch950: openssh-7.5p1-sandbox.patch Patch951: openssh-7.6p1-pkcs11-uri.patch # PKCS#11 ECDSA keys (upstream #2474, 8th iteration) Patch952: openssh-7.6p1-pkcs11-ecdsa.patch +# Unbreak scp between two IPv6 hosts (#1620333) +Patch953: openssh-7.8p1-scp-ipv6.patch License: BSD Group: Applications/Internet @@ -442,6 +444,7 @@ popd %patch950 -p1 -b .sandbox %patch951 -p1 -b .pkcs11-uri %patch952 -p1 -b .pkcs11-ecdsa +%patch953 -p1 -b .scp-ipv6 %patch200 -p1 -b .audit %patch201 -p1 -b .audit-race