diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-11-12 23:08:43 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-11-12 23:47:00 +0100 |
commit | 279ec1df202698d94c7992162621f6f7c00a7695 (patch) | |
tree | 26710926769d2fe0439fd84f4e33e3491f374a84 | |
parent | 8b341eb05d7c93515f8c6aff0db568146339bcb1 (diff) | |
download | patches-279ec1df202698d94c7992162621f6f7c00a7695.tar patches-279ec1df202698d94c7992162621f6f7c00a7695.tar.gz |
ftp-client: Restrict to TCP connections.
* guix/ftp-client.scm (ftp-open): Force SOCK_STREAM as the socket type
to avoid calling 'connect' on a datagram socket.
-rw-r--r-- | guix/ftp-client.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guix/ftp-client.scm b/guix/ftp-client.scm index 37feb895a5..e98708ac4d 100644 --- a/guix/ftp-client.scm +++ b/guix/ftp-client.scm @@ -95,7 +95,7 @@ or a TCP port number), and return it." (let loop ((addresses addresses)) (let* ((ai (car addresses)) - (s (socket (addrinfo:fam ai) (addrinfo:socktype ai) + (s (socket (addrinfo:fam ai) SOCK_STREAM ;TCP only (addrinfo:protocol ai)))) (catch 'system-error |