mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-27 20:50:34 +02:00
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.
This commit is contained in:
@@ -95,7 +95,7 @@ or a TCP port number), and return it."
|
|||||||
|
|
||||||
(let loop ((addresses addresses))
|
(let loop ((addresses addresses))
|
||||||
(let* ((ai (car 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))))
|
(addrinfo:protocol ai))))
|
||||||
|
|
||||||
(catch 'system-error
|
(catch 'system-error
|
||||||
|
|||||||
Reference in New Issue
Block a user