Commit graph

146 commits

Author SHA1 Message Date
Riccardo Spagni
64fabf2eb7
Merge pull request #3252
f689a77e Fix #602 Turn on socket keepalive (Howard Chu)
2018-02-16 14:24:30 +01:00
Howard Chu
f689a77e56
Fix #602 Turn on socket keepalive 2018-02-11 23:32:37 +00:00
Erik de Castro Lopo
32c0f908cd Allow the number of incoming connections to be limited
It was already possible to limit outgoing connections. One might want
to do this on home network connections with high bandwidth but low
usage caps.
2018-01-29 11:14:02 +11:00
Riccardo Spagni
baaeefdecc
Merge pull request #3098
935e39c7 levin_protocol_handler_async: erase from back of vector instead of front (stoffu)
2018-01-27 17:23:53 -08:00
xmr-eric
18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
stoffu
935e39c7f3
levin_protocol_handler_async: erase from back of vector instead of front 2018-01-26 10:58:07 +09:00
moneromooo-monero
40ab12a773
epee: remove dependency on common 2018-01-10 01:57:51 +00:00
Riccardo Spagni
6ca30ae666
Merge pull request #2936
cb9aa23c levin_protocol_handler_async: another attempt at fixing at exception (moneromooo-monero)
64d23ce3 Revert "epee: keep a ref to a connection we're deleting" (moneromooo-monero)
2017-12-25 21:21:17 +02:00
Riccardo Spagni
effdc82b58
Merge pull request #2930
7f4bb612 levin_protocol_handler_async: add missing response handler locking (moneromooo-monero)
2017-12-25 21:20:41 +02:00
Riccardo Spagni
2b00899bb2
Merge pull request #2920
bd5cce07 network_throttle: fix ineffective locking (moneromooo-monero)
e0a61299 network_throttle: remove unused xxx static member (moneromooo-monero)
24f584d9 cryptonote_core: remove unused functions with off by one bugs (moneromooo-monero)
b1634aa3 blockchain: don't leave dangling pointers in this (moneromooo-monero)
8e60b81c cryptonote_core: fix db leak on error (moneromooo-monero)
213e326c abstract_tcp_server2: log init_server errors as fatal (moneromooo-monero)
b51dc566 use const refs in for loops for non tiny types (moneromooo-monero)
f0568ca6 net_parse_helpers: fix regex error checking (moneromooo-monero)
b49ddc76 check accessing an element past the end of a container (moneromooo-monero)
2305bf26 check return value for generate_key_derivation and derive_public_key (moneromooo-monero)
a4240d9f catch const exceptions (moneromooo-monero)
45a1c4c0 add empty container sanity checks when using front() and back() (moneromooo-monero)
56fa6ce1 tests: fix a buffer overread in a unit test (moneromooo-monero)
b4524892 rpc: guard against json parsing a non object (moneromooo-monero)
c2ed8618 easylogging++: avoid buffer underflow (moneromooo-monero)
187a6ab2 epee: trap failure to parse URI from request (moneromooo-monero)
061789b5 checkpoints: trap failure to load JSON checkpoints (moneromooo-monero)
ba2fefb9 checkpoints: pass std::string by const ref, not const value (moneromooo-monero)
38c8f4e0 mlog: terminate a string at last char, just in case (moneromooo-monero)
d753d716 fix a few leaks by throwing objects, not newed pointers to objects (moneromooo-monero)
fe568db8 p2p: use size_t for arbitrary counters instead of uint8_t (moneromooo-monero)
46d6fa35 cryptonote_protocol: sanity check chain hashes from peer (moneromooo-monero)
25584f86 cryptonote_protocol: print peer versions when unexpected (moneromooo-monero)
490a5d41 rpc: do not try to use an invalid txid in relay_tx (moneromooo-monero)
2017-12-25 21:17:52 +02:00
Riccardo Spagni
13b846971c
Merge pull request #2909
dba2de61 levin_protocol_handler_async: call handler destroy function on dtor (moneromooo-monero)
2017-12-25 21:16:37 +02:00
moneromooo-monero
bd1f6029a3
http_client: rewrite header parsing manually for speed
boost::regex is stupendously atrocious at parsing malformed data
2017-12-23 11:29:58 +00:00
moneromooo-monero
f1bdc9a42a
tests: add http client fuzz test 2017-12-23 11:29:52 +00:00
moneromooo-monero
e0a61299fb
network_throttle: remove unused xxx static member 2017-12-18 15:16:09 +00:00
moneromooo-monero
213e326cc9
abstract_tcp_server2: log init_server errors as fatal
so they show up by default
2017-12-18 15:15:57 +00:00
moneromooo-monero
f0568ca6ac
net_parse_helpers: fix regex error checking 2017-12-18 15:15:52 +00:00
moneromooo-monero
45a1c4c088
add empty container sanity checks when using front() and back() 2017-12-18 15:15:40 +00:00
moneromooo-monero
187a6ab2d2
epee: trap failure to parse URI from request 2017-12-18 15:15:26 +00:00
Riccardo Spagni
066fd7aced
Merge pull request #2877
43f5269f Wallets now do not depend on the daemon rpc lib (moneromooo-monero)
bb89ae8b move connection_basic and network_throttle from src/p2p to epee (moneromooo-monero)
4abf25f3 cryptonote_core does not depend on p2p anymore (moneromooo-monero)
2017-12-17 12:59:44 +02:00
moneromooo-monero
bb89ae8b20
move connection_basic and network_throttle from src/p2p to epee
These even had the epee namespace.
This fixes some ugly circular dependencies.
2017-12-16 23:28:43 +00:00
moneromooo-monero
09ce03d612
move includes around to lessen overall load 2017-12-16 22:46:38 +00:00
Riccardo Spagni
9b511d3e93
Merge pull request #2866
cf5f6236 Corrections in rate limiting / trottle code, especially in 'out' direction (rbrunner7)
2017-12-16 23:24:41 +02:00
Riccardo Spagni
6c0953b15a
Merge pull request #2860
3dffe71b new wipeable_string class to replace std::string passphrases (moneromooo-monero)
7a2a5741 utils: initialize easylogging++ in on_startup (moneromooo-monero)
54950829 use memwipe in a few relevant places (moneromooo-monero)
000666ff add a memwipe function (moneromooo-monero)
2017-12-16 23:19:27 +02:00
moneromooo-monero
cb9aa23cc5
levin_protocol_handler_async: another attempt at fixing at exception 2017-12-15 18:38:53 +00:00
moneromooo-monero
64d23ce331
Revert "epee: keep a ref to a connection we're deleting"
This reverts commit f2939bdce8.
2017-12-15 13:23:21 +00:00
moneromooo-monero
7f4bb612fb
levin_protocol_handler_async: add missing response handler locking 2017-12-15 10:47:45 +00:00
moneromooo-monero
dba2de61e7
levin_protocol_handler_async: call handler destroy function on dtor 2017-12-11 18:33:37 +00:00
Riccardo Spagni
f51bac990e
Merge pull request #2906
27aa8ce9 net_utils_base: fix peer list parsing (moneromooo-monero)
fe5ab2c4 epee: fix kv_unserialize return value when a field is not found (moneromooo-monero)
2017-12-10 13:08:23 +02:00
moneromooo-monero
27aa8ce95b
net_utils_base: fix peer list parsing
Fields are written with their "name" as key, and that name changed.
2017-12-09 22:16:58 +00:00
rbrunner7
cf5f623616 Corrections in rate limiting / trottle code, especially in 'out' direction
Deleted 3 out of 4 calls to method connection_basic::sleep_before_packet
that were erroneous / superfluous, which enabled the elimination of a
"fudge" factor of 2.1 in connection_basic::set_rate_up_limit;
also ended the multiplying of limit values and numbers of bytes
transferred by 1024 before handing them over to the global throttle
objects
2017-11-28 21:18:01 +01:00
moneromooo-monero
3dffe71b72
new wipeable_string class to replace std::string passphrases 2017-11-27 22:25:57 +00:00
Tim L
f5461a6a07 RPC: CORS add Access-Control-Allow-Headers to OPTIONS preflight 2017-11-16 13:56:16 -05:00
Riccardo Spagni
5de492be40
Merge pull request #2629
383ff4f6 remove "using namespace std" from headers (moneromooo-monero)
2017-11-14 21:29:49 +02:00
moneromooo-monero
383ff4f689
remove "using namespace std" from headers
It's nasty, and actually breaks on Solaris, where if.h fails to
build due to:

  struct map *if_memmap;
2017-11-14 16:56:10 +00:00
Riccardo Spagni
f48aeab5c4
Merge pull request #2756
0bf09154 Fix file permission issue (Tim L)
2017-11-14 16:02:28 +02:00
Riccardo Spagni
a2241e8151
Merge pull request #2753
fa514082 RPC: get_info add rpc_connections_count (Tim L)
2017-11-14 15:54:33 +02:00
Riccardo Spagni
9317c9c57e
Merge pull request #2617
7dbf76d0 Fix an object lifetime bug in net load tests (moneromooo-monero)
2017-11-14 14:54:05 +02:00
Tim L
fa51408272 RPC: get_info add rpc_connections_count 2017-11-07 16:34:49 -05:00
Tim L
0bf0915446 Fix file permission issue
This branch fixes a file permission issue introduced by 69c37200aa
2017-11-03 11:27:50 -04:00
Riccardo Spagni
35dbb3be33
Merge pull request #2663
4b228dd3 cmake: epee: use var from FindOpenSSL.cmake (redfish)
29497f79 epee: use boost type for SSL error code (redfish)
2017-11-01 11:25:53 +02:00
Riccardo Spagni
54463b33b3
Merge pull request #2723
69c37200 RPC Add cross origin resource sharing support (Tim L)
2017-10-31 20:38:38 +02:00
Tim L
69c37200aa RPC Add cross origin resource sharing support 2017-10-30 13:55:56 -04:00
moneromooo-monero
969b5a2ae3
net_helper: fix massive slowdown after SSL support 2017-10-20 17:27:15 +01:00
redfish
29497f7920 epee: use boost type for SSL error code
Fixes compile error when building with OpenSSL v1.1:

contrib/epee/include/net/net_helper.h: In member function ‘void epee::net_utils::blocked_mode_client::shutdown_ssl()’:
contrib/epee/include/net/net_helper.h:579:106: error: ‘SSL_R_SHORT_READ’ was not declared in this scope
    if (ec.category() == boost::asio::error::get_ssl_category() && ec.value() != ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ))
                                                                                                          ^
contrib/epee/include/net/net_helper.h:579:106: note: suggested alternative: ‘SSL_F_SSL_READ’

See boost/asio/ssl/error.hpp.
Boost handles differences between OpenSSL versions.

cmake: fail if Boost is too old for OpenSSL v1.1
2017-10-17 16:12:58 -04:00
Riccardo Spagni
f1bee553b1
Merge pull request #2602
bc1b9333 frob level 1 logs a bit for consistency (moneromooo-monero)
2017-10-15 18:49:48 +02:00
Jaquee
1cf940f2a1 epee http_client SSL support 2017-10-15 17:29:04 +02:00
moneromooo-monero
7dbf76d0da
Fix an object lifetime bug in net load tests
The commands handler must not be destroyed before the config
object, or we'll be accessing freed memory.

An earlier attempt at using boost::shared_ptr to control object
lifetime turned out to be very invasive, though would be a
better solution in theory.
2017-10-09 16:46:42 +01:00
moneromooo-monero
bc1b93333e
frob level 1 logs a bit for consistency
Level 1 logs map to INFO, so setting log level to 1 should
show these. Demote some stuff to DEBUG to avoid spam, though.
2017-10-07 20:03:42 +01:00
Lee Clagett
8b00687735 Upgrades to epee::net_utils::network_address
- internal nullptr checks
  - prevent modifications to network_address (shallow copy issues)
  - automagically works with any type containing interface functions
  - removed fnv1a hashing
  - ipv4_network_address now flattened with no base class
2017-10-05 11:57:09 -04:00
Riccardo Spagni
c08b6cc485
Merge pull request #2475
f2939bdc epee: keep a ref to a connection we're deleting (moneromooo-monero)
2017-10-02 23:15:56 +04:00