[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: ftp-client: Restrict to TCP/IP connections.
From: |
Ludovic Courtès |
Subject: |
01/02: ftp-client: Restrict to TCP/IP connections. |
Date: |
Tue, 17 Nov 2015 08:45:08 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit b7f4677999f9ad9f457088b69e1dc86e9664ec76
Author: Ludovic Courtès <address@hidden>
Date: Tue Nov 17 09:38:01 2015 +0100
ftp-client: Restrict to TCP/IP connections.
Fixes <http://bugs.gnu.org/21925>.
Regression introduced in 279ec1d.
Reported by Chris Marusich <address@hidden>.
* guix/ftp-client.scm (ftp-open): Restrict sockets to
SOCK_STREAM/IPPROTO_IP.
---
guix/ftp-client.scm | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/guix/ftp-client.scm b/guix/ftp-client.scm
index f02d460..e76f08a 100644
--- a/guix/ftp-client.scm
+++ b/guix/ftp-client.scm
@@ -140,8 +140,9 @@ TIMEOUT, an ETIMEDOUT error is raised."
(let loop ((addresses addresses))
(let* ((ai (car addresses))
- (s (socket (addrinfo:fam ai) SOCK_STREAM ;TCP only
- (addrinfo:protocol ai))))
+ (s (socket (addrinfo:fam ai)
+ ;; TCP/IP only
+ SOCK_STREAM IPPROTO_IP)))
(catch 'system-error
(lambda ()