1. 07 Oct, 2019 1 commit
    • Yossi Gottlieb's avatar
      TLS: Connections refactoring and TLS support. · b087dd1d
      Yossi Gottlieb authored
      * Introduce a connection abstraction layer for all socket operations and
      integrate it across the code base.
      * Provide an optional TLS connections implementation based on OpenSSL.
      * Pull a newer version of hiredis with TLS support.
      * Tests, redis-cli updates for TLS support.
      b087dd1d
  2. 08 Jul, 2019 1 commit
    • Oran Agra's avatar
      diskless replication on slave side (don't store rdb to file), plus some other related fixes · 2de544cf
      Oran Agra authored
      The implementation of the diskless replication was currently diskless only on the master side.
      The slave side was still storing the received rdb file to the disk before loading it back in and parsing it.
      
      This commit adds two modes to load rdb directly from socket:
      1) when-empty
      2) using "swapdb"
      the third mode of using diskless slave by flushdb is risky and currently not included.
      
      other changes:
      --------------
      distinguish between aof configuration and state so that we can re-enable aof only when sync eventually
      succeeds (and not when exiting from readSyncBulkPayload after a failed attempt)
      also a CONFIG GET and INFO during rdb loading would have lied
      
      When loading rdb from the network, don't kill the server on short read (that can be a network error)
      
      Fix rdb check when performed on preamble AOF
      
      tests:
      run replication tests for diskless slave too
      make replication test a bit more aggressive
      Add test for diskless load swapdb
      2de544cf
  3. 21 Mar, 2018 2 commits
  4. 08 Aug, 2017 1 commit
  5. 18 Apr, 2017 2 commits
  6. 07 Mar, 2017 1 commit
  7. 09 Sep, 2016 1 commit
  8. 11 Jun, 2015 2 commits
    • antirez's avatar
      anet.c: new API anetTcpNonBlockBestEffortBindConnect() · a017b7ec
      antirez authored
      This performs a best effort source address binding attempt. If it is
      possible to bind the local address and still have a successful
      connect(), then this socket is returned. Otherwise the call is retried
      without source address binding attempt.
      
      Related to issues #2609 and #2612.
      a017b7ec
    • antirez's avatar
      anetTcpGenericConnect(), jump to error not end on error · 8fa8b251
      antirez authored
      Two code paths jumped to the "ok, return the socket to the user" code
      path to handle error conditions.
      
      Related to issues #2609 and #2612.
      8fa8b251
  9. 21 May, 2015 1 commit
  10. 19 Jan, 2015 1 commit
    • Matt Stancliff's avatar
      Improve networking type correctness · 53c082ec
      Matt Stancliff authored
      read() and write() return ssize_t (signed long), not int.
      
      For other offsets, we can use the unsigned size_t type instead
      of a signed offset (since our replication offsets and buffer
      positions are never negative).
      53c082ec
  11. 11 Dec, 2014 2 commits
  12. 22 Oct, 2014 1 commit
  13. 17 Oct, 2014 1 commit
  14. 18 Sep, 2014 3 commits
  15. 13 Aug, 2014 1 commit
  16. 07 Aug, 2014 1 commit
    • kingsumos's avatar
      cluster: fix node connection memory leak · 1a5e5b6b
      kingsumos authored
      Cluster leaks memory while connecting due to missing freeaddrinfo()
      
      (Commit modified by @antirez. The freeaddrinfo() call was misplaced so
       in case of no address was bound, the memory leak was still there).
      
      Closes #1801
      1a5e5b6b
  17. 26 Jun, 2014 1 commit
  18. 24 Apr, 2014 1 commit
  19. 04 Mar, 2014 1 commit
    • Matt Stancliff's avatar
      Bind source address for cluster communication · e5b1e7be
      Matt Stancliff authored
      The first address specified as a bind parameter
      (server.bindaddr[0]) gets used as the source IP
      for cluster communication.
      
      If no bind address is specified by the user, the
      behavior is unchanged.
      
      This patch allows multiple Redis Cluster instances
      to communicate when running on the same interface
      of the same host.
      e5b1e7be
  20. 31 Jan, 2014 1 commit
    • Nenad Merdanovic's avatar
      Add support for listen(2) backlog definition · d76aa96d
      Nenad Merdanovic authored
      In high RPS environments, the default listen backlog is not sufficient, so
      giving users the power to configure it is the right approach, especially
      since it requires only minor modifications to the code.
      d76aa96d
  21. 10 Jan, 2014 1 commit
    • antirez's avatar
      anetResolveIP() added to anet.c. · 774f0bd4
      antirez authored
      The new function is used when we want to normalize an IP address without
      performing a DNS lookup if the string to resolve is not a valid IP.
      
      This is useful every time only IPs are valid inputs or when we want to
      skip DNS resolution that is slow during runtime operations if we are
      required to block.
      774f0bd4
  22. 25 Dec, 2013 4 commits
  23. 10 Jul, 2013 2 commits
  24. 09 Jul, 2013 1 commit
  25. 08 Jul, 2013 6 commits
    • Geoff Garside's avatar
      Add anetTcp6Server() function. · 56df8271
      Geoff Garside authored
      Refactor the common code from anetTcpServer into internal function which
      can be used by both anetTcpServer and anetTcp6Server.
      56df8271
    • Geoff Garside's avatar
      Add static anetV6Only() function. · 72a39226
      Geoff Garside authored
      This function sets the IPV6_V6ONLY option to 1 to use separate stack
      IPv6 sockets.
      72a39226
    • Geoff Garside's avatar
      Change anetTcpGenericConnect to use AF_UNSPEC. · 62a3b7e3
      Geoff Garside authored
      This allows anetTcpGenericConnect to try to connect to AF_INET6
      addresses in addition to any resolved AF_INET addresses.
      62a3b7e3
    • Geoff Garside's avatar
      Update anetPeerToString to handle AF_INET6 addrs. · 23f4d905
      Geoff Garside authored
      Change the sockaddr_in to sockaddr_storage which is capable of storing
      both AF_INET and AF_INET6 sockets. Uses the sockaddr_storage ss_family
      to correctly return the printable IP address and port.
      23f4d905
    • Geoff Garside's avatar
      Update anetTcpAccept to handle AF_INET6 addresses. · fa723d98
      Geoff Garside authored
      Change the sockaddr_in to sockaddr_storage which is capable of storing
      both AF_INET and AF_INET6 sockets. Uses the sockaddr_storage ss_family
      to correctly return the printable IP address and port.
      fa723d98
    • Geoff Garside's avatar
      Update anetResolve to resolve AF_INET6 as well. · e7b34e8d
      Geoff Garside authored
      Change the getaddrinfo(3) hints family from AF_INET to AF_UNSPEC to
      allow resolution of IPv6 addresses as well as IPv4 addresses. The
      function will return the IP address of whichever address family is
      preferenced by the operating system. Most current operating systems
      will preference AF_INET6 over AF_INET.
      
      Unfortunately without attempting to establish a connection to the
      remote address we can't know if the host is capable of using the
      returned IP address. It might be desirable to have anetResolve
      accept an additional argument specifying the AF_INET/AF_INET6 address
      the caller would like to receive. Currently though it does not appear
      as though the anetResolve function is ever used within Redis.
      e7b34e8d