3915 Commits

Author SHA1 Message Date
Luca Boccassi
1e87d92527 Problem: zmq_connect (TCP) has no IPv4 fallback
Solution: if opening an IPv6 TCP socket fails because IPv6 is not
available, try to open an IPv4 socket instead when creating and
connecting a TCP endpoint.
2016-04-07 14:16:35 +01:00
Luca Boccassi
82aed1dee6 Problem: zmq_bind IPv4 fallback still tries IPv6
Solution: if opening an IPv6 TCP socket fails because IPv6 is not
available, try to open an IPv4 socket instead when creating and
binding a TCP endpoint.
2016-04-07 14:15:29 +01:00
Pieter Hintjens
197a9e05e2 Merge pull request #115 from bluca/linger_fix_backport
Problem: connection might terminate prematurely
2016-03-30 19:41:34 +02:00
Luca Boccassi
cf0dcd2379 Problem: NEWS not up to date with bug fixes
Solution: mention closing issue #1877
2016-03-30 18:11:57 +01:00
Soren Hansen
bf92026527 Avoid terminating connections prematurely
While sending very large messages (far beyond what fits in a the tcp
buffer, so it takes multiple sendto system calls for it to finish),
zmq_close will close the connection regardless of ZMQ_LINGER.

In case no engine is attached, a pipe->check_read() is needed to look
for the delimiter in the pipe and ultimately trigger the pipe
termination.

However, if there *is* an engine attached, the check_read() looks ahead
and finds the delimiter and terminates the connection even though the
engine might actually still be in the middle of sending a message.

This happens because while the io_thread is still busy sending the data,
the pipe can get terminated and the io thread ends up being terminated.
2016-03-30 17:04:48 +01:00
Constantin Rack
d8732929d5 Merge pull request #112 from hintjens/master 2016-03-15 07:02:50 +01:00
Pieter Hintjens
bbe4f3ede4 Problem: does not build on Windows with libsodium
Solution: fixed wrong condition around randombytes_close ().
2016-03-15 06:26:34 +01:00
Constantin Rack
e0041f1fcb Merge pull request #111 from hintjens/master
Problem: cannot disable encryption if libsodium is installed
2016-03-12 20:52:29 +01:00
Pieter Hintjens
98834596f1 Problem: cannot disable encryption if libsodium is installed
The sodium/tweetnacl detection logic does not yet you disable
encryption if libsodium is installed.

Fixes #1850 in libzmq/master
2016-03-12 15:40:24 +01:00
Pieter Hintjens
5aa7bdfc68 Merge pull request #109 from hintjens/master
Updated news for fix #1831
2016-03-01 17:05:52 +01:00
Pieter Hintjens
25be170b57 Updated news for fix #1831 2016-03-01 17:05:22 +01:00
Pieter Hintjens
c1d8420335 Merge pull request #108 from hintjens/master
Problem: can't be sure crypto_box always returns 0
2016-03-01 17:05:10 +01:00
Pieter Hintjens
58badc44c1 Problem: can't be sure crypto_box always returns 0
Libsodium has started returning -1 in some cases.

Solution: allow and handle error returns from these calls.

Fixes #1831
2016-03-01 17:01:00 +01:00
Pieter Hintjens
4985b084e6 Merge pull request #107 from grimbeaver/fix-vs-versions
Update VS version resource and package version.
2016-02-29 21:38:54 +01:00
Thomas Brezinski
2fba10d691 Update VS version resource and package version. 2016-02-29 13:32:07 -06:00
Pieter Hintjens
0b781f84e8 Merge pull request #104 from bluca/uninitialised_news
Problem: news out of date
2016-02-16 15:05:39 +01:00
Luca Boccassi
b1a150a675 Problem: my name is not in the AUTHORS file
Solution: add myself to the list
2016-02-16 14:04:10 +00:00
Luca Boccassi
5977a8a5b6 Problem: NEWS not up to date with bug fixes
Solution: mention issues 1806 and 1807
2016-02-16 14:02:30 +00:00
Pieter Hintjens
4d45ee9440 Merge pull request #103 from bluca/uninitialised_sockopt
Problem: curve keys getsockopt uninitialised read
2016-02-16 14:51:29 +01:00
Luca Boccassi
eda5426865 Problem: Travis CI uses libsodium unstable branch
Solution: use stable branch instead of the development branch, and
also clone with --depth 1 to make it more efficient.
2016-02-16 13:41:46 +00:00
Luca Boccassi
6a66c05179 Problem: curve keys getsockopt uninitialised read
Solution: always initialised zmq::options_t class variables arrays to
avoid reading uninitialised data when CURVE is not yet configured and
a getsockopt ZMQ_CURVE_{SERVER | PUBLIC | SECRET]KEY is issued.

Backport from libzmq.
2016-02-16 13:40:40 +00:00
Pieter Hintjens
cb811a1e0c Merge pull request #102 from hintjens/master
Backported fix #1608
2016-02-16 12:03:11 +01:00
Pieter Hintjens
87dd03750b Updated NEWS for fix #1608 2016-02-16 12:02:26 +01:00
Pieter Hintjens
4cee289697 Problem: Windows 7 TCP slow start
See issue #1608.

This is an old issue with Windows 7. The effect is that we see a latency
ramp on the first 500 messages.

* The ramp is unaffected by message size.
* Sleeping up to 100msec between sends has no effect except to switch
    off ZeroMQ batching so making the ramp more visible.
* After 500 messages, latency falls back down to ~10-40 usec.
* Over inproc:// the ramp happens when we use the signaler class.
* Client-server over inproc:// does not show the ramp.
* Client-server over tcp:// shows a similar ramp.

We know that the signaller is using TCP on Windows. We can 'prime' the
connection by doing 500 dummy sends. This potentially causes new sockets
to be delayed on creation, which is not a good solution.

Note that the signaller sends zero-byte messages. This may also be
confusing TCP.

Solution: flood the receive buffer when creating a new FD pair; send a
1M buffer and discard it.

Fixes #1608
2016-02-16 12:01:45 +01:00
Pieter Hintjens
b624f1adc9 Merge pull request #101 from bluca/gcc6
Problem: build broken with gcc 6
2016-02-12 23:17:22 +01:00
meox
49593151db [PATCH] fix error with gcc 5.2 2016-02-12 21:57:51 +00:00
Pieter Hintjens
b341dd7ffe Merge pull request #100 from CommanderBubble/master
compilation fixes for when _WIN32_WINNT >= 0x0600
2016-02-12 13:45:12 +01:00
Michael
2058dece77 added windows.hpp with include check
windows.hpp must be included before zmq.h when _WIN32_WINNT >= 0x0600
2016-02-12 23:36:48 +11:00
Michael
45404f4b06 added windows.hpp with include check
windows.hpp must be included before zmq.h when _WIN32_WINNT >= 0x0600
2016-02-12 23:36:07 +11:00
Michael
6f4e9f13f3 changed order of includes
windows.hpp must be included before zmq.h when _WIN32_WINNT >= 0x0600
2016-02-12 23:34:43 +11:00
Michael
af3b9452a2 remove include that is already in header 2016-02-12 23:33:22 +11:00
Michael
626abbdaf2 update for mingw's default _WIN32_WINNT
mingw defaults with _WIN32_WINNT as 0x0502 which doesn't define inet_pton(), so add a conditional check
2016-02-12 23:32:20 +11:00
Michael
d0b341cf0f update for mingw's default _WIN32_WINNT
mingw defaults with _WIN32_WINNT as 0x0502 which doesn't define inet_pton(), so add a conditional check
2016-02-12 23:31:55 +11:00
Michael
41cc603d11 update for mingw's default _WIN32_WINNT
mingw defaults with _WIN32_WINNT as 0x0502 which doesn't define inet_pton(), so add a conditional check
2016-02-12 23:31:24 +11:00
Pieter Hintjens
ad7fe55e95 Merge pull request #98 from zeromq/revert-95-patch-1
Revert "update minimum _WIN32_WINNT version to 0x0600 for 4.1.4 onwards"
2016-02-11 14:16:39 +01:00
Min RK
e68c2d2563 Revert "update minimum _WIN32_WINNT version to 0x0600 for 4.1.4 onwards" 2016-02-11 14:00:41 +01:00
Pieter Hintjens
b539733cee Merge pull request #97 from minrk/configure-tweetnacl
support tweetnacl in configure
2016-02-08 13:01:12 +01:00
Min RK
3ae84e6b00 fallback on tweetnacl if libsodium is not found and not explicitly requested 2016-02-08 12:44:45 +01:00
Min RK
6f022cce92 add --with-tweetnacl to configure
allows building with tweetnacl without cmake
2016-02-08 12:44:45 +01:00
Pieter Hintjens
58ac36593f Merge pull request #95 from CommanderBubble/patch-1
update minimum _WIN32_WINNT version to 0x0600 for 4.1.4 onwards
2016-02-02 14:17:48 +01:00
Michael
e3fba7d447 updated minimum _WIN32_WINNT version to 0x0600
if_nametoindex requires minimum windows version vista, which is 0x0600
2016-02-02 22:32:16 +11:00
Pieter Hintjens
5501f19a0f Update NEWS 2016-01-21 18:04:09 +01:00
Pieter Hintjens
9bdfb94999 Merge pull request #93 from GreatFruitOmsk/master
Backport zeromq/libzmq#1723
2016-01-21 18:03:03 +01:00
Ilya Kulakov
0c5c536303 Backport zeromq/libzmq#1723 2016-01-21 19:56:23 +06:00
Pieter Hintjens
802c2a8a2b Merge pull request #92 from GreatFruitOmsk/master
Backport zeromq/libzmq#1722
2016-01-21 08:58:23 +01:00
Ilya Kulakov
4788c7d2a9 Backport zeromq/libzmq#1722 2016-01-21 13:47:55 +06:00
Pieter Hintjens
b7a30978ca Merge pull request #91 from minrk/backport-winrandom-backwards
backport winrandom fix
2016-01-18 15:53:16 +01:00
Anonymous Maarten
d1a0baf25f tweetNaCL: fix winrandom
problem: random byte generation on windows got stuck in an infinite loop
solution: the failure test is incorrect. Change it
2016-01-18 15:24:33 +01:00
Pieter Hintjens
c7642aa434 Merge pull request #90 from hintjens/master
Reverted patch for IPv6 support
2016-01-18 13:05:29 +01:00
Pieter Hintjens
795a7e3de2 Revert "Fix missing include for if_nametoindex on Windows."
This reverts commit b9dbc5b8caea5491c7330d891e93e2791d84c906.
2016-01-18 13:04:00 +01:00