From b7f4677999f9ad9f457088b69e1dc86e9664ec76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 17 Nov 2015 09:38:01 +0100 Subject: [PATCH] ftp-client: Restrict to TCP/IP connections. Fixes . Regression introduced in 279ec1d. Reported by Chris Marusich . * guix/ftp-client.scm (ftp-open): Restrict sockets to SOCK_STREAM/IPPROTO_IP. --- guix/ftp-client.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guix/ftp-client.scm b/guix/ftp-client.scm index f02d460061..e76f08afd4 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 ()