Commit Graph

391 Commits

Author SHA1 Message Date
Min RK
5f8488de6d move FindSodium to builds/cmake/Modules
with the rest of the CMake modules
2018-01-13 13:15:51 -08:00
Min RK
f8da0ac721 move cmake ZeroMQConfig.cmake.in to builds/cmake 2018-01-13 13:14:53 -08:00
evoskuil
f41b51ee04 Problem: NuGet packaging versions out of date. 2017-12-14 17:24:38 -08:00
Luca Boccassi
ac552ba448 Problem: accept4 not available on all platforms
Solution: check for availability in CMake and autoconf before using it
2017-11-18 11:33:53 +00:00
f18m
bfbb4ff2e9 Background threads enhancements (#2778)
* Background thread scheduling 

- add ZMQ_THREAD_AFFINITY ctx option; set all thread scheduling options
from the context of the secondary thread instead of using the main
process thread context!
- change ZMQ_THREAD_PRIORITY to support setting NICE of the background
thread when using SCHED_OTHER
2017-10-16 12:29:03 +01:00
Luca Boccassi
9be8cebd21 Merge pull request #2765 from GreatFruitOmsk/issue-2764
Problem: Race condition in IPC sockets
2017-10-06 09:25:33 +01:00
Ilya Kulakov
656cdb959a Problem: Race condition in IPC sockets
Solution: Don't unlink file on close

File may not belong to the socket at that point.
2017-10-05 14:57:10 -07:00
Alexander Dubovik
02c46463d7 fix build for msvc2017 2017-10-05 22:54:12 +03:00
Luca Boccassi
124e04659c Problem: ZMQ_HAVE_O_CLOEXEC not defined by CMake
Solution: add it to CMake's platform.hpp.in
2017-09-01 10:15:42 +01:00
Robin Stacey
83f54d90ad Problem: ZMQ_HAVE_O_CLOEXEC always disabled
Solution: Escape quotes in cmake test.
2017-09-01 16:37:27 +09:00
sigiesec
fc2b7cd5ea Problem: coverage includes tweetnacl, which is not our code
Solution: exclude tweetnacl from coverage
2017-08-23 14:42:52 +02:00
Luca Boccassi
e81a40b8bd Problem: CMake build ignores SO_BINDTODEVICE
Solution: add it to CMake's platform.hpp.in
2017-08-19 12:07:25 +01:00
Luca Boccassi
8ecfee475c Problem: missing files from VS2008 solution
Solution: generate list of sources and headers with:

 ls -1 src/*cpp | sort | sed 's|src/\(.*\)|      <File RelativePath="..\\..\\..\\..\\src\\\1" />|g'
 ls -1 src/*hpp | sort | sed 's|src/\(.*\)|      <File RelativePath="..\\..\\..\\..\\src\\\1" />|g'

and add them.
2017-08-18 12:45:12 +01:00
sigiesec
301f3c70c2 Problem: code duplication between curve_client_t and curve_server_t decode and encode
Solution: extracted common base class curve_mechanism_base_t
2017-08-18 11:34:22 +02:00
Luca Boccassi
9ac244a67c Problem: coverage CI job does not print test errors
Solution: run make check with VERBOSE=1
2017-08-17 17:20:56 +01:00
sigiesec
406af1ef67 Problem: ZAP tests are now generic but placed in test_security_curve.cpp
Solution: Move ZAP tests to own file test_security_zap.cpp, move common code to testutil_security.hpp
2017-08-17 11:45:18 +02:00
sigiesec
6e8a0b31be Problem: ZAP client code is duplicated in all mechanisms
Solution: created a zap_client_t class, extracted first function send_zap_request from curve_server_t
2017-08-16 18:04:30 +02:00
Jake Cobb
0cbdc18817 Problem: CMake build does not allow static linking libsodium
Solution: Pass along SODIUM_STATIC define if set in CMake config
2017-08-10 13:04:15 -04:00
Brian Russell
b963542e8f Add socket option BINDTODEVICE
Linux now supports Virtual Routing and Forwarding (VRF) as per:

https://www.kernel.org/doc/Documentation/networking/vrf.txt

In order for an application to bind or connect to a socket with an
address in a VRF, they need to first bind the socket to the VRF device:

    setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, dev, strlen(dev)+1);

Note "dev" is the VRF device, eg. VRF "blue", rather than an interface
enslaved to the VRF.

Add a new socket option, ZMQ_BINDTODEVICE, to bind a socket to a device.
In general, if a socket is bound to a device, eg. an interface, only
packets received from that particular device are processed by the socket.

If device is a VRF device, then subsequent binds/connects to that socket
use addresses in the VRF routing table.
2017-07-31 15:31:47 +01:00
Luca Boccassi
fbb6bbdcb8 Problem: reading from /dev/urandom is clunky
Solution: if available use the getrandom function as it doesn't
require any synchronization, state or cleanup
2017-07-28 11:28:19 +01:00
Luca Boccassi
2626fdfa23 Problem: tweetnacl leaks file descriptor on fork+exec
Solution: open with O_CLOEXEC if available or set FD_CLOEXEC if not
2017-07-28 11:27:55 +01:00
Luca Boccassi
86f9f1df7a Problem: CI doesn't build with debugging symbols
Solution: pass -g so that valgrind/asan can print useful backtraces
2017-05-01 22:57:05 +01:00
Luca Boccassi
463c2d75ae Problem: CI builds and test runs not done in parallel
Solution: run make with -j5, as now the tests support it.
2017-05-01 22:57:05 +01:00
Luca Boccassi
48792f8006 Problem: CI runs libsodium tests
Solution: don't, libzmq's CI tests are not responsible for testing
libsodium stable releases. Save some time in the CI.
2017-05-01 22:57:05 +01:00
bbdb68
1d58a00992 Problem: no windows UWP support
* add define for windows/UWP

* prevent issue with COM references

* gettickcount not available on uwp

* add compiler definitions

* add convenitnece cmake file

* brute force uwp compilation

* fix compiler version

* cosmetics
2017-04-04 09:50:33 +01:00
evoskuil
6c1fb4d0b8 Problem: NuGet pacakge out of date. 2017-03-29 10:44:10 -07:00
evoskuil
72714ad297 Problem: no nuget package for 4.2.2 2017-03-24 01:47:22 -07:00
evoskuil
f2d7b2cad8 Problem: curve not enabled by default in Visual Studio. 2017-03-23 22:29:19 -07:00
evoskuil
91a01f447d Problem: libsodium linked by default in Visual Studio projs. 2017-03-23 22:28:45 -07:00
evoskuil
dbb5e72638 Problem: Visual Studio projects intertwined and drifting. 2017-03-23 21:32:48 -07:00
chuggafan
7913e96271 I have added msys building, license stuff (#2387)
(msys building is buggy, please be aware, it fails to compile on my
machine) also I modified the buildall.bat/buildbase.bat to use correct
MSVC versions instead of "visual studio 2017"
2017-03-19 22:38:43 +00:00
mlodew
9091623243 Fixed lib and dll paths in visual studio build (#2375)
Fixed path to lib and dll files.
2017-03-19 16:50:33 +00:00
Luca Boccassi
3ab4796c5a Problem: ZMQ background threads are unnamed
Solution: use pthread API to set the name. For now call every thread
"ZMQ b/g thread". Would be nice to number the I/O threads and name
explicitly the reaper thread, but in reality a bit of internal API
churn would be necessary, so perhaps it's not worth it.
This is useful when debugging a process with many threads.
2017-03-12 00:46:15 +00:00
boringuy
d6f4263ce3 cmake WITH_LIBSODIUM option is broken (#2349)
* cmake WITH_LIBSODIUM option is broken

- Fixed the variable name in platform.hpp.in
- Fixed #if check for randombytes_close() when libsodium is used

* Fixed typo from previous commit

* Reverted compile error fix for randombytes_close()
2017-02-22 22:28:05 +00:00
zstang
3b0dfd528f #2341 fix
the root path name specified in this file cause the #2341 problem, the root path name is not need.
2017-02-21 17:35:36 +08:00
chuggafan
020ff65efa Updated buildbase and buildall to work with visual studio 2017 2017-01-16 14:54:40 -05:00
Luca Boccassi
bbae5d0f9a Problem: dpkg-query might fail in CI build and fail the build
Solution: rework the bash test to avoid build failures as intended
and make it an easier one-liner
2016-12-27 14:45:45 +01:00
Luca Boccassi
822def9b2b Problem: Travis rebuilds libsodium every time
Solution: use packages on Ubuntu and brews on OSX. The packages and
the brews are always kept up to date, so it's no use to rebuild the
libsodium stable branch manually everytime.
2016-12-27 11:48:38 +01:00
Luca Boccassi
f287c7a2aa Problem: eventfd leaks socket on fork+exec
Solution: if available, use eventfd with EFD_CLOEXEC flag to make
the process close the socket on fork+exec
2016-12-26 19:08:27 +01:00
Luca Boccassi
211898d243 Problem: epoll leaks socket on fork+exec
Solution: if available, use epoll_create1 with EPOLL_CLOEXEC flag to
make the process close the socket on fork+exec
2016-12-26 19:08:27 +01:00
Kos
43941052a9 add link libsodium.a 2016-12-22 14:25:00 +08:00
Kos
edad90f770 mingw32 fix 2016-12-22 09:35:49 +08:00
Anass Bouassaba
ad045512b9 Build support for VS2017, Windows SDK 10.0.14393.0, toolset v141 2016-12-09 09:21:11 +01:00
Dmitriy-GH
488cb5a022 MSVC 2015 project for compile libzmq.dll in WinXP compatible mode 2016-11-02 15:51:58 +05:00
Mário Kašuba
3996d4e20d Merge branch 'master' of github.com:zeromq/libzmq
# Conflicts:
#	builds/msvc/vs2012/libsodium.import.props
2016-10-10 11:02:32 +02:00
Bernd Langpap
96c306cc54 Problem: parameter %1 set hard to build target and prevents the skipping of pause
Solution: removed Pause
2016-07-04 12:13:44 +02:00
Bernd Langpap
73631bf1c9 modified build.bat to support non-pausing installation 2016-07-04 11:06:56 +02:00
Bernd Langpap
5de974a036 modified build.bat for msvc to support no-pausing script-based installation
Signed-off-by: Bernd Langpap <Bernd.Langpap@airbus.com>
2016-07-04 10:31:11 +02:00
Sam Lishak
d49e43bbc8 Problem: FD_SETSIZE not set to 16k for all build definitions
Solution: Set FD_SETSIZE to 16k for all other build definitions.
2016-06-13 09:42:54 +01:00
Michael Lutz
7a6ff07a01 Problem: Windows performance is not optimal due to select().
Solution: Provide poll() for Windows as well. This is a build option that
defaults to off as the resulting binary will only run on Windows Vista or
newer.

This is not tested with alternative Winsock service providers like VMCI,
but the documentation for WSAPoll does not mention limitations.

On my local machine, throughput improves by ~10 % (20 simultaneous
remote_thr workes to one local_thr, 10 byte messages), while latency
improves by ~30 % (measured with remote/local_lat).
2016-06-11 19:17:18 +02:00