Armin Novak
f631958a08
Fixed argument warning.
2018-05-02 13:08:17 +02:00
Martin Fleisz
855af9e941
Merge pull request #4557 from akallabeth/connect_error_fix
...
Set connection error if TCP connect fails.
2018-04-12 12:10:56 +02:00
Armin Novak
2fc31fcb37
Set connection error if TCP connect fails.
2018-04-11 09:09:23 +02:00
Andre Esteve
d240069b5e
Gateway (RDG) use same IP for both channels
2018-04-10 20:59:33 -07:00
Armin Novak
26d9957608
Fix pointer type mismatch struct sockaddr_storage* and struct sockaddr*
2018-04-05 10:47:50 +02:00
Martin Fleisz
ff8b2c1b0e
core: Fix IPv6 handling on Windows
...
On Windows the sockaddr struct is smaller than sockaddr_in6.
This causes getsockname to fail because the buffer is too small.
The new code uses sockaddr_storage which should be large enough to
hold any supported protocol address structure.
See: http://pubs.opengroup.org/onlinepubs/009696699/basedefs/sys/socket.h.html
2018-04-04 17:19:18 +02:00
Armin Novak
78de329f1f
Fixed IPv4/IPv6 to string
2018-02-08 17:26:31 +01:00
Armin Novak
7305828122
Fix #4239 : Various memory leaks
...
* Fixed all tests, now can be run with -DWITH_ADDRESS_SANITIZER=ON compiled.
* Enabled address sanitizer for nightly builds.
2017-12-12 11:40:48 +01:00
Armin Novak
2cc64298f2
Fix #4281 : Added option to prefer IPv6 over IPv4
2017-11-27 11:43:54 +01:00
Jura Sasek
4edb5cf7e6
Build for Solaris
2017-05-24 04:27:01 -07:00
Armin Novak
8250bbd6c8
Setting DNS error if lookup fails.
2016-12-19 13:49:40 +01:00
Norbert Federa
f71b6b46e8
fix string format specifiers
...
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Norbert Federa
c6e6b44143
countless WLog/printf format specifier fixes
2016-11-25 17:06:25 +01:00
Norbert Federa
7befab856c
Support for OpenSSL 1.1.0
2016-11-24 17:50:09 +01:00
Armin Novak
9c64e77a84
Disabled thread local storage on iOS.
...
iOS does not support Thread Local Storage.
Disabling it for now until a solution is found.
Print a compiler warning informing developers about this issue.
2016-10-06 13:43:10 +02:00
akallabeth
7c5fcc9ee2
Merge pull request #3149 from bmiklautz/feb22
...
Misc fixes
2016-02-23 20:23:52 +01:00
Bernhard Miklautz
be02849ece
tcp: set the timeout to 9s
...
Set the TCP_USER_TIMEOUT to 9s as suggested by @giox069.
See #3015 for details
2016-02-23 15:40:20 +01:00
volth
8b9c40248a
Increase TCP_USER_TIMEOUT to avoid disconnections.
...
TCP_USER_TIMEOUT value is too small, it is only 4 seconds.
That causes random disconnections reported in the bug report https://github.com/FreeRDP/FreeRDP/issues/2802
This patch should fix the bug report https://github.com/FreeRDP/FreeRDP/issues/2802
2016-02-23 15:40:20 +01:00
Bernhard Miklautz
e6f013eac7
fix spelling
...
replace occured with occurred
Fixes #3142
2016-02-22 17:01:43 +01:00
Armin Novak
22f704c0a8
Fixed _socket error check.
2016-02-03 11:45:22 +01:00
Nito Martinez
2d5c78849e
Fix formatting: else if in its own line and no brackets for single statements
2015-11-26 09:50:03 +01:00
Nito Martinez
89d8a68f4a
Disable setting socket options for preexisting socket like: keepalive and tcp_nodelay, these should be set extenally if needed. Do not close the socket if the clientaddress could not be set
2015-11-25 08:36:49 +01:00
Nito Martinez
428cbd802d
Fixes #2982 . The idea is to be able to create the socket externally and pass that socket FD to FreeRDP so that it can be used there.
...
The idea suggested is to use the following interface:
settings->ServerHostname = "|"
settings->ServerPort = SocketFD
2015-11-20 02:44:35 +01:00
Armin Novak
7d8ab23877
WSAEvent fixes ported from realjiangms pull 2870.
2015-09-05 15:18:01 +02:00
Armin Novak
7ebf4879f0
Fixed uninitialised events.
2015-08-27 15:33:06 +02:00
Armin Novak
134a16d522
Fixed WSAEventSelect mode reset.
2015-08-27 15:33:06 +02:00
Armin Novak
e6c23cb534
Implemented Async TCP connect with abort event
...
* Implemented unified freerdp_tcp_connect_timeout with connect abort.
* Implemented unified freerdp_tcp_connect_multi with connect abort.
* Added connect abort to freerdp_tcp_connect.
* Added freerdp_abort_connect and abortEvent.
2015-08-27 15:33:06 +02:00
Bernhard Miklautz
68e8569110
winpr/synch: remove the dependency on winsock.h
...
winsock.h pulls in a lot of defines and dependencies that are not
required and partially unwanted in winpr's core (for parts that are not
related to network). In order to get rid of this dependency and have an
independent defines for extended winpr functions the WINPR_FD_* defines
are used internally (and for exposed functions). Where required, like in
WSAEventSelect, the FD_* is mapped to WINPR_FD_*.
2015-07-14 11:39:41 +02:00
Armin Novak
d18b0fbeb4
Handle API updated.
2015-07-03 09:52:52 +02:00
zihao.jiang
75407edf37
Fix event created for WSAEventSelect: The event we pass to WSAEventSelect should be WSAEVENT instead of normal event.
...
From MSDN, it looks same as CreateEvent(NULL, FALSE, FALSE, NULL):
The WSACreateEvent function creates a manual-reset event object with an initial state of nonsignaled. The event object is unnamed.
However they are not really equivalent. When we use normal event, the WSAEventSelect still works but the event appears to be 'auto-reset'.
2015-07-01 01:52:59 +08:00
Bernhard Miklautz
bf73f4e4f1
Fix unchecked strdups
...
* add missing checks
* adapt function return values where necessary
* add initial test for settings
2015-06-22 19:09:59 +02:00
Marc-André Moreau
35e26020aa
freerdp: patch multiple leaks and OOM errors
2015-05-22 14:14:57 -04:00
Marc-André Moreau
30dd40e10a
wfreerdp: fix and improve remote assistance
2015-05-07 14:20:49 -04:00
Marc-André Moreau
6b1fefea40
freerdp: fix remote assistance mode, add multi-address connection
2015-05-06 16:32:45 -04:00
Norbert Federa
af79c30913
Merge pull request #2554 from akallabeth/event_fix
...
Fix for transport event reset
2015-04-22 11:04:37 +02:00
Bryan Everly
8c75127a67
Necessary changes to get latest branch working on OpenBSD 5.6
2015-04-21 14:42:06 -04:00
Armin Novak
f634e52289
Using auto reset event now.
2015-04-20 15:04:44 +02:00
Armin Novak
5525d9f88b
Fixed uninitialized return value.
2015-04-15 10:38:04 +02:00
Bernhard Miklautz
388d014888
core/tcp: set TCP_USER_TIMEOUT if available
...
Keepalive settings are usually (depending on the implementation) only
used if the TCP connection is idle.
If the network is interrupted/disconnected/... click or keyboard input
generates outgoing traffic therefore the connection isn't idle
anymore and keepalives might not be used causing the connection to
stay open and the client to stall.
Linux 2.6.36 added a TCP_USER_TIMEOUT TCP socket option that lets a
program specify the maximum time transmitted data may remain
unacknowledged before TCP will close the corresponding connection with
ETIMEDOUT.
Setting TCP_USER_TIMEOUT allows us to detect a network problem (like
cable disconnect) even if the connection isn't idle.
2015-02-20 13:22:01 +01:00
Marc-André Moreau
44d06888bb
libfreerdp-core: fix BIO leaks
2015-02-18 15:36:57 -05:00
Marc-André Moreau
991f7b347d
libfreerdp-core: further abstract multiple connections used internally by tsg from rdpTransport
2015-02-15 10:06:17 -05:00
Marc-André Moreau
edfc5120b7
libfreerdp-core: replace rdpTcp by BufferedSocket BIO
2015-02-14 10:14:13 -05:00
Marc-André Moreau
e904195e49
libfreerdp-core: more rdpTcp refactoring
2015-02-13 16:51:08 -05:00
Marc-André Moreau
e241330daf
libfreerdp-core: rewrite tls_write_all to use front BIO only
2015-02-13 16:02:37 -05:00
Marc-André Moreau
c001a69d50
libfreerdp-core: move wait_read/wait_write operations under BIO layer
2015-02-13 15:22:27 -05:00
Marc-André Moreau
b7a619ff8a
libfreerdp-core: move some rdpTcp operations under BIO layer
2015-02-13 14:26:02 -05:00
Marc-André Moreau
69b93c322d
libfreerdp-core: fix transport crash, reduce rdpTcp usage
2015-02-13 09:27:54 -05:00
Marc-André Moreau
aa8b843250
libfreerdp-core: move stuff down from transport to tsg layer
2015-02-11 11:57:02 -05:00
Marc-André Moreau
46724b0c75
libfreerdp-core: fix tsg crash on disconnect
2015-02-11 10:57:14 -05:00
Marc-André Moreau
a4979456e5
Merge branch 'master' of github.com:FreeRDP/FreeRDP into gateway
2015-02-04 11:36:05 -05:00
Petr Sumbera
b09d865d5c
Better to use HAVE_SYS_FILIO_H when we already have it.
2015-02-03 13:29:35 -08:00
Petr Sumbera
7fee867447
Added ifdef to previous commit.
2015-02-02 10:59:51 -08:00
Petr Sumbera
17df42e4b5
Fixes some build issues on Solaris 11.
2015-02-02 08:48:54 -08:00
Marc-André Moreau
5cdc464933
libfreerdp-core: warn but do not fail in freerdp_tcp_set_keep_alive_mode
2015-01-30 11:34:09 -05:00
Marc-André Moreau
ef71181897
libfreerdp-core: fix Win32 gateway authentication
2015-01-29 14:07:02 -05:00
Marc-André Moreau
b387708069
libfreerdp-core: fix Win32 socket event handle
2015-01-29 11:35:52 -05:00
Marc-André Moreau
bb67968141
libfreerdp-core: cleanup transport debug output
2015-01-28 15:37:20 -05:00
Marc-André Moreau
a9df86ab16
libfreerdp-core: update gateway code for Windows
2015-01-28 14:54:03 -05:00
Marc-André Moreau
5bf8b1509e
libfreerdp-core: improve socket BIO handling
2015-01-28 13:46:17 -05:00
Marc-André Moreau
32a991c165
libfreerdp-core: move socket event and nonblock options to socket BIO
2015-01-27 21:18:26 -05:00
Marc-André Moreau
b552aa9363
libfreerdp-core: add support for multiple redirection target addresses
2014-12-27 18:53:27 -05:00
Marc-André Moreau
772a0aaf0c
libfreerdp-core: fix TCP connection timeout (non-Windows)
2014-12-27 16:48:32 -05:00
Marc-André Moreau
6c2ebb2b58
channels: redirection valgrind fixes
2014-12-27 13:50:50 -05:00
Marc-André Moreau
9dd77ae14a
libfreerdp-core: add usage of TargetNetAddresses in ip-based redirection when hostname resolution fails
2014-12-26 13:49:25 -05:00
Mario Lombardo
3c634f91db
Rename tcp-functions as they are conflicting with qemu functions
2014-11-29 21:14:39 +01:00
Armin Novak
8d4589b1e1
Replaced fprintf error messages with WLog.
2014-11-16 12:21:38 +01:00
Marc-André Moreau
ddedc574f3
freerdp: remove tcp, uds utils
2014-11-12 14:06:34 -05:00
Mehul Dhorda
256eab682b
Added SIGPIPE handling for iOS.
2014-11-10 11:52:29 -08:00
Bernhard Miklautz
4dcc0957f1
Fix build on windows
...
Problem was introduces by a non pull request push for ipv6 support
2014-10-22 12:16:40 +02:00
Jean-Louis Dupond
0dc0e01568
Add ipv6 client support
2014-10-17 12:08:39 +02:00
Armin Novak
2f519d7f16
Replaced logging in libfreerdp with wlog defines.
2014-09-15 08:48:46 +02:00
Marc-André Moreau
e4a4aa4d3a
Merge branch 'master' of github.com:awakecoding/FreeRDP into shadow
...
Conflicts:
channels/encomsp/client/encomsp_main.c
libfreerdp/core/tcp.c
libfreerdp/crypto/certificate.c
server/Windows/CMakeLists.txt
server/X11/xf_cursor.c
server/X11/xf_input.c
server/X11/xf_interface.c
server/X11/xf_monitors.c
server/X11/xf_peer.c
2014-08-11 19:22:33 -04:00
Armin Novak
bcb5f90ee6
Replaced perror with DEBUG_WARN
2014-08-11 09:19:23 +02:00
Armin Novak
f4c133eaf8
Replaced custom logging mechanism with WLog wrapper.
2014-08-07 16:51:24 +02:00
Marc-André Moreau
9838200068
libfreerdp-core: fix unix domain socket support
2014-08-06 12:08:00 -04:00
Marc-André Moreau
3895c930a3
Merge branch 'master' of github.com:awakecoding/FreeRDP into shadow
2014-08-05 09:56:12 -04:00
Bernhard Miklautz
8c318da7b1
fix compiler warnings
2014-07-29 05:22:29 +02:00
Marc-André Moreau
d8b858811f
shadow: initial windows server-side connectivity
2014-07-17 21:15:22 -04:00
Bernhard Miklautz
c99d4648ff
Merge pull request #1950 from hardening/kill_select
...
kill the last remaining select() in libfreerdp
2014-07-11 16:41:31 +02:00
Hardening
3fce288c66
Fix unclean SSL disconnection
...
This patch prevent an infinite loop when the remote peer disconnect
the socket without cleanly closing the SSL connection.
2014-07-10 23:35:11 +02:00
Hardening
6223460557
kill the last remaining select() in libfreerdp
2014-07-09 11:28:41 +02:00
Hardening
542811291c
Use poll() instead of select() when available
...
select() has the major drawback that it cannot handle file descriptor
that are bigger than 1024. This patch makes use of poll() instead of
select() when poll() support is available.
2014-07-03 15:26:49 +02:00
Marc-André Moreau
04968b18c4
libfreerdp-core: replace all OpenSSL built-in BIOs by new full duplex BIOs
2014-06-01 21:37:20 -04:00
Marc-André Moreau
a8be174e03
libfreerdp-core: remove ineffective full duplex locks
2014-06-01 11:20:13 -04:00
Marc-André Moreau
c5e4c74bb6
libfreerdp-core: fix build on Windows
2014-05-30 15:29:06 -04:00
Marc-André Moreau
b1416af362
libfreerdp-core: add locks to disable full duplex BIOs (currently unsafe)
2014-05-30 14:53:10 -04:00
Marc-André Moreau
709df9aecc
libfreerdp-core: add connection timeout, fix gateway bypass local
2014-05-30 14:03:20 -04:00
Marc-André Moreau
629858b676
libfreerdp-core: add gateway-usage-method command line option, avoid resetting BIO flags we shouldn't reset
2014-05-30 12:31:26 -04:00
Marc-André Moreau
e8d3164f99
libfreerdp-core: fix windows build warning
2014-05-22 16:08:10 -04:00
Marc-André Moreau
b24c95ce59
libfreerdp-core: fix tcp_new on Windows
2014-05-22 15:13:00 -04:00
Hardening
3200baca4b
Correctly export ringbuffer function and fix a warning
2014-05-21 22:20:38 +02:00
Hardening
dd6d829550
Allow transport_write calls to be non-blocking
...
This big patch allows to have non-blocking writes. To achieve
this, it slightly changes the way transport is handled. The misc transport
layers are handled with OpenSSL BIOs. In the chain we insert a
bufferedBIO that will bufferize write calls that couldn't be honored.
For an access with Tls security the BIO chain would look like this:
FreeRdp Code ===> SSL bio ===> buffered BIO ===> socket BIO
The buffered BIO will store bytes that couldn't be send because of
blocking write calls.
This patch also rework TSG so that it would look like this in the
case of SSL security with TSG:
(TSG in)
> SSL BIO => buffered BIO ==> socket BIO
/
FreeRdp => SSL BIO => TSG BIO
\
> SSL BIO => buffered BIO ==> socket BIO
(TSG out)
So from the FreeRDP point of view sending something is only BIO_writing
on the frontBio (last BIO on the left).
2014-05-21 17:42:31 +02:00
Hobby-Student
03315cebe8
FreeBSD compile errors
2014-05-01 15:09:35 +02:00
Benoît LeBlanc
3581d27f08
tcp: (Mac OS X) added setsockopt(SOL_SOCKET, SO_NOSIGPIPE) to prevent the application crashing on a broken socket.
2014-04-10 16:26:44 -04:00
Marc-André Moreau
3782c2ad72
Merge branch 'master' of github.com:FreeRDP/FreeRDP
2014-01-25 16:34:34 -05:00
Mike McDonald
a563362ea2
Changed #define for SOL_TCP to be IPPROTO_TCP instead of 6
2014-01-21 11:06:29 -05:00
Mike McDonald
c0d26443ce
Added #define for SOL_TCP to fix compilation error on iOS
2014-01-21 08:27:21 -05:00
Mike McDonald
c4f6dcc24f
Added auto reconnect to FreeRDP core and X11 client
2014-01-16 17:38:56 -05:00
Marc-André Moreau
5536033a8a
libfreerdp-core: transport refactoring
2013-11-07 17:37:58 -05:00
Marc-André Moreau
61f95fbe16
libfreerdp-core: transport code style cleanup
2013-11-07 15:14:59 -05:00