me
/
guix
Archived
1
0
Fork 0

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.
master
Ludovic Courtès 2015-11-12 23:08:43 +01:00
parent 8b341eb05d
commit 279ec1df20
1 changed files with 1 additions and 1 deletions

View File

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