1. 04 Jan, 2017 1 commit
    • Luca Boccassi's avatar
      Problem: peer can close connection before SO_NOSIGPIPE is set · 31a3a068
      Luca Boccassi authored
      Solution: setsockopt returns EINVAL if the connection was closed by
      the peer after the accept returned a valid socket. This is a valid
      network error and should not cause an assert.
      To handle this we have to extract the setsockopt from the stream
      engine, as there's no clean way to return an error from the
      constructor. Instead, try to set this option before creating the
      engine in the callers, and return immediately as if the accept
      had failed to avoid churn. Do the same for the connect calls by
      setting the option in open_socket, so that the option for that
      case is set even before connecting, so there's no possible race
      condition.
      Since this has to be done in 4 places (tcp/ipc listener, socks
      connecter and open_socket) add an utility function in ip.cpp.
      Fixes #1442
      31a3a068
  2. 01 Jan, 2017 1 commit
  3. 30 Nov, 2016 1 commit
  4. 14 Nov, 2016 2 commits
    • Luca Boccassi's avatar
      Problem: IPV6_TCLASS setsockopt fails on IPv4 socket · 90f091ab
      Luca Boccassi authored
      Solution: if setsockopt errors out and errno is set to ENOPROTOOPT
      (or EINVAL on OSX) ignore it and carry on.
      90f091ab
    • Saif Hasan's avatar
      Make ZMQ_TOS work with IPv6 sockets · fc8007e8
      Saif Hasan authored
      Summary:
      To set `Type Of Service` for IP layer packets ZMQ provides `ZMQ_TOS` socket
      option. However this only works for v4 sockets. Considering things are moving to
      IPv6 heavily (especially within enterprise networks), ZMQ should support setting
      `traffic class` for v6 based on `ZMQ_TOS`.
      
      There is a subtle difference between v4 and v6 in terms of the positioning of
      field but TOS has same meaning in both v4 and v6. Linux provides following APIs
      for v4/v6 to set TOS field value.
      ```
      // For v4
      setsockopt(fd, IPPROTO_IP, IP_TOS, tos, sizeof(tos));
      
      // For v6
      setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, tos, sizeof(tos));
      ```
      
      Test Plan:
      Make sure Cmake works fine and all tests passes.
      Imported this change to `OpenR` project and tested on our local testbed.
      Captured some packets exchanged between PUB/SUB and ROUTER/ROUTER sockets
      pairs. Verify that `TCLASS` value is set as per expectation.
      
      Tasks: #2208
      fc8007e8
  5. 17 Sep, 2016 1 commit
  6. 14 May, 2016 1 commit
  7. 18 Feb, 2016 1 commit
  8. 28 Jan, 2016 1 commit
  9. 14 Aug, 2015 2 commits
  10. 02 Jun, 2015 1 commit
  11. 22 Jan, 2015 1 commit
  12. 10 Jun, 2014 1 commit
  13. 13 Feb, 2014 1 commit
  14. 03 Feb, 2014 1 commit
  15. 02 Jan, 2014 1 commit
  16. 06 Dec, 2013 1 commit
    • Brandon Carpenter's avatar
      Add support for extending ZAP request address with IPC peer credentials. · a018ef5e
      Brandon Carpenter authored
      Another take on LIBZMQ-568 to allow filtering IPC connections, this time
      using ZAP.  This change is backward compatible.  If the
      ZMQ_ZAP_IPC_CREDS option is set, the user, group, and process IDs of the
      peer process are appended to the address (separated by colons) of a ZAP
      request; otherwise, nothing changes.  See LIBZMQ-568 and zmq_setsockopt
      documentation for more information.
      a018ef5e
  17. 25 Nov, 2013 2 commits
  18. 08 Aug, 2013 1 commit
  19. 18 Jul, 2013 1 commit
  20. 12 Mar, 2013 1 commit
    • Pieter Hintjens's avatar
      Removed corporate advertisements from source file headers · f0f16505
      Pieter Hintjens authored
      Copyrights had become ads for Sustrik's corporate sponsors, going against the original
      agreement to share copyrights with the community (that agreement was: one line stating
      iMatix copyright + one reference to AUTHORS file). The proliferation of corporate ads
      is also unfair to the many individual authors. I've removed ALL corporate title from
      the source files so the copyright statements can now be centralized in AUTHORS and
      source files can be properly updated on an annual basis.
      f0f16505
  21. 02 Jan, 2013 2 commits
  22. 19 Jun, 2012 1 commit
  23. 16 Jun, 2012 1 commit
  24. 12 Jun, 2012 2 commits
  25. 08 Jun, 2012 1 commit
    • Hiten P's avatar
      Consolidate TCP-specific common code into their own files. · db13fbf4
      Hiten P authored
      The TCP keepalive tuning code has been moved into the newly added
      files; this also allows future TCP-specific code to be added into
      these files, without bloating the IP level code and establishes a
      known file structure for other IP-based transports.
      
      Remember: this is a no-op change, hence no API or functionality
      was changed as part of this commit.
      db13fbf4
  26. 07 May, 2012 1 commit
  27. 13 Apr, 2012 1 commit
  28. 06 Apr, 2012 1 commit
  29. 05 Apr, 2012 1 commit
  30. 01 Nov, 2011 1 commit
  31. 31 Oct, 2011 1 commit
  32. 26 Oct, 2011 1 commit
  33. 02 Sep, 2011 1 commit
  34. 18 Aug, 2011 2 commits