Browse Source

ftp-client: Restrict to TCP/IP connections.

Fixes <http://bugs.gnu.org/21925>.
Regression introduced in 279ec1d.
Reported by Chris Marusich <cmmarusich@gmail.com>.

* guix/ftp-client.scm (ftp-open): Restrict sockets to
  SOCK_STREAM/IPPROTO_IP.
wip-mediagoblin
Ludovic Courtès 7 years ago
parent
commit
b7f4677999
  1. 5
      guix/ftp-client.scm

5
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 ()

Loading…
Cancel
Save