guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/05: ftp-client: Restrict to TCP connections.


From: Ludovic Courtès
Subject: 01/05: ftp-client: Restrict to TCP connections.
Date: Thu, 12 Nov 2015 22:47:26 +0000

civodul pushed a commit to branch master
in repository guix.

commit 279ec1df202698d94c7992162621f6f7c00a7695
Author: Ludovic Courtès <address@hidden>
Date:   Thu Nov 12 23:08:43 2015 +0100

    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.
---
 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 37feb89..e98708a 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]