Commit Graph

1270 Commits

Author SHA1 Message Date
orignal
ae0cf2e831 use memory pool for tunnel messages 2021-10-20 21:05:22 -04:00
Simon Vetter
a348e10620 libi2pd: fix undefined behaviour and memory overruns
This fixes the following issues (flagged by cppcheck):
[libi2pd/ECIESX25519AEADRatchetSession.cpp:537]: (error) Buffer is accessed out of bounds: m_NSREncodedKey
[libi2pd/Identity.cpp:22]: (error) Buffer is accessed out of bounds: keys.publicKey
[libi2pd/Identity.cpp:22]: (error) Buffer is accessed out of bounds: publicKey
[libi2pd/NetDb.cpp:70] -> [libi2pd/NetDb.cpp:69]: (error) Iterator 'it' used after element has been erased
[libi2pd/SSUData.cpp:186] -> [libi2pd/SSUData.cpp:187]: (warning) Shifting 32-bit value by 63 bits is undefined behaviour.
2021-10-19 22:27:12 +02:00
Simon Vetter
af794f901f libi2pd: minor logging fixes 2021-10-19 22:27:06 +02:00
orignal
278fd2d8d5 create tunnel I2NP message for tunnel data 2021-10-18 19:03:08 -04:00
orignal
197882a4c9 create I2NP depending on type in I2NP block 2021-10-17 15:30:24 -04:00
orignal
d310efcb5c pass I2NPMessage by move 2021-10-17 11:31:37 -04:00
orignal
1af9117b80 don't create new tunnel message for encryption/decryption 2021-10-15 14:01:41 -04:00
orignal
44e01b41f8 reserve address for 3 introducers 2021-10-12 13:28:16 -04:00
orignal
7def2fa6a3 use std::vector for address list 2021-10-10 09:53:21 -04:00
orignal
48131f4597 don't store full path with RouterInfo 2021-10-07 15:08:33 -04:00
orignal
49e8cf89d8 don't send short tunnel build messages for ElGamal only destinations 2021-10-06 12:42:32 -04:00
orignal
e6bcd04a36 short build message for re-created tunnels and far end transports 2021-10-05 19:38:33 -04:00
orignal
af133f4968 fixed crash if incorrect blinded signature type 2021-09-29 12:38:38 -04:00
orignal
cc75efcbca fixed build for C++11 2021-09-27 18:25:15 -04:00
orignal
2eded7cdd7 send ping every keealive interval for client tunnels 2021-09-26 16:25:12 -04:00
orignal
b10e5ce358 send ping 2021-09-26 11:20:20 -04:00
orignal
1bb1d89fab change back to map and unodered_map 2021-09-25 18:30:17 -04:00
orignal
b9dd4aee8d use flat_map for incompete messages 2021-09-24 19:12:12 -04:00
orignal
518e53a61c use flat_map for smaller tables 2021-09-24 14:23:39 -04:00
orignal
18b6ba80f2 cleanup RelayRequests 2021-09-22 19:09:56 -04:00
orignal
8debdc264c use common cleanup timer for all SSU sessions 2021-09-21 22:13:34 -04:00
orignal
31bdce1f1f cleanup received messages list by timestamp 2021-09-21 19:01:22 -04:00
orignal
317d8cdc48 don't allocate separate buffers for SessionRequest and SessionCreated 2021-09-18 15:44:43 -04:00
orignal
5b2b9e00a2 reuse receive buffer 2021-09-17 21:52:39 -04:00
R4SAS
d2faec70be
[gzip] do not initialize deflator if gzip is not enabled for tunnel
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2021-09-14 14:48:21 +03:00
orignal
247b6a0ed2 memory pool for SSU packets 2021-09-13 13:13:27 -04:00
orignal
f7f36568ef set gzip compression to false by default 2021-09-12 14:29:43 -04:00
orignal
e054c6e82c memory pool for SSU messages and fragments 2021-09-11 18:58:27 -04:00
orignal
5e2e1a1e3d don't include old tunnel to LeaseSet if recreated 2021-09-10 19:57:38 -04:00
orignal
ad036de69d eliminate allocation of m_ExtendedBuffer 2021-09-09 21:19:52 -04:00
orignal
20652f7995 resseed if too few floodfills 2021-09-09 15:12:53 -04:00
R4SAS
2f88a75325
Merge pull request #1688 from yangfl/openssl
disable pthread_setname_np on GNU/Hurd
2021-09-05 21:00:19 +00:00
orignal
292fe94352 RouterContext is always ECIES 2021-09-05 11:16:41 -04:00
orignal
76dca1b46b don't handle ElGamal build record 2021-09-05 09:10:13 -04:00
orignal
a54b5c18c6 fixed crash 2021-09-05 09:08:29 -04:00
orignal
c763472914 select ECIES routers only for peer tests and introducers 2021-09-05 08:41:32 -04:00
orignal
41d6c117ee make sure server tunnel is published 2021-09-04 18:45:32 -04:00
orignal
e8f4c42bfb moved current language from RouterContext to ClientContext 2021-09-04 14:01:57 -04:00
yangfl
3f46ca41ca disable pthread_setname_np on GNU/Hurd
which does not exist on GNU/Hurd
2021-09-04 15:07:09 +08:00
orignal
349022ae42 don't select ElGamal routers for tunnels 2021-09-03 13:30:01 -04:00
orignal
bb518d3d51 don't pass BN_CTX to encrypt/decrypt functions 2021-08-31 18:51:40 -04:00
orignal
c45e202fab removed ElGamal encryption support for own router 2021-08-29 14:22:01 -04:00
orignal
541464b705 don't delete floodfill if number of remaining floodfills is less than minimal 2021-08-26 15:13:58 -04:00
R4SAS
f0c49b58fb
suppress inconsistent-missing-override warning message
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2021-08-23 19:29:55 +03:00
R4SAS
455c71ff25 fix warning about ifr_name size
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2021-08-23 17:00:57 +03:00
orignal
96850da31e 2.39.0 2021-08-23 06:58:36 -04:00
R4SAS
b3e7b1b5ac
Squashed commit of the following:
commit 40ec4e8b59
Author: Simon Vetter <simon.vetter@runbox.com>
Date:   Fri Jul 30 21:23:27 2021 +0200

    libi2pd: mark additional ipv6 addresses/nets as reserved

    This adds :: (undefined address), ::1 (loopback address) as well as
    ff00::/8 (multicast prefix) to reservedIPv6Ranges.

    A bunch of nodes seem to be publishing bogus addresses (mostly ::1)
    in the netDB, resulting in unnecessary tunnel build failures.

Signed-off-by: R4SAS <r4sas@i2pmail.org>
2021-08-13 09:11:56 +03:00
orignal
49b3ac7f77 don't reschedule resend timer for terminated streams 2021-08-11 12:23:43 -04:00
orignal
64ec7dd559 narrow down random range 2021-08-03 19:26:09 -04:00
orignal
367df4d0db RAND_bytes from random router selection 2021-08-03 15:43:58 -04:00
orignal
da7e41c188 use Tag<64> for ratechet tags 2021-08-01 18:42:13 -04:00
R4SAS
d88fe203e1
[tunnels] count outbound traffic for zero-hop tunnels
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2021-08-01 09:25:02 +03:00
orignal
1e01c30e63 set pool for zero-hops tunnels 2021-07-30 14:12:50 -04:00
orignal
7a55d1fc38 don't insert garlic tag for short tunnel build reply if the same router 2021-07-28 21:14:03 -04:00
orignal
f8623b6121 consistent path for explicit peers 2021-07-28 19:08:55 -04:00
orignal
9a3c22f47d don't encrypt ShortTunnelBuild and ShortTunnelBuildReply if on the same router 2021-07-28 15:06:24 -04:00
orignal
e68cff8bba try routers before random router 2021-07-27 18:35:30 -04:00
orignal
513493fa78 fixed typo 2021-07-26 18:46:29 -04:00
orignal
a6937c792f more precise router selection 2021-07-26 17:51:32 -04:00
orignal
99c7d5c23a don't create enryptor for ECIES record encryption 2021-07-25 22:30:54 -04:00
orignal
cd8e8970de NTP request through compatible address 2021-07-24 16:01:11 -04:00
orignal
26d5ced2ef optimal padding for one-time messages 2021-07-23 20:28:55 -04:00
orignal
c7234f705a let NTCP sync through ipv6 2021-07-23 18:34:51 -04:00
orignal
c153471c49 use short tunnel build if possible 2021-07-22 20:58:35 -04:00
orignal
f28024cfe8 decline transit tunnels from short tunnel build message 2021-07-21 18:12:37 -04:00
orignal
911ab9813e handle encrypteed I2NPShortTunnelBuildReply in destination 2021-07-21 14:55:38 -04:00
orignal
cfbf5862f9 set pool for tunnel before build 2021-07-21 13:08:12 -04:00
orignal
5cb1f5986d use msgID from ECIESx25519 block 2021-07-20 22:00:06 -04:00
orignal
0b14c810fb handle ShortTunnelBuildReply 2021-07-20 19:38:36 -04:00
orignal
c2334db8f8 correct reply key for short tunnel build record 2021-07-20 18:02:48 -04:00
orignal
4807092df6 fixed typo 2021-07-20 15:17:58 -04:00
orignal
bdc1107c96 correct message type for ShortTunnelBuild 2021-07-20 14:35:02 -04:00
orignal
db9223b0d5 set minimal version for floodfill to 0.9.38 2021-07-19 17:50:55 -04:00
orignal
6ecfe0789f don't allocate payload buffer for every single ECIESx25519 message 2021-07-18 18:45:08 -04:00
orignal
a37cf058cd router with expired introducer is still valid 2021-07-16 20:12:41 -04:00
orignal
f4902e6642 eligble floodfill must be reachable by ipv4 2021-07-16 13:53:12 -04:00
orignal
5d022c25ba don't send datetime for one time key message 2021-07-16 09:44:22 -04:00
orignal
0cd9f1b002 precalculate padding sizes 2021-07-15 19:01:43 -04:00
orignal
cd0751d3f1 padding block for message for router 2021-07-15 18:30:32 -04:00
orignal
a1d1a5df74 datetime block for message for router 2021-07-15 18:18:55 -04:00
orignal
197f13f9c0 rollback 2021-07-15 14:02:20 -04:00
orignal
41bfc7899d keep own RouterInfo in netdb 2021-07-14 14:46:56 -04:00
orignal
2c129b6d39 create and handle short tunnel build reply 2021-07-12 19:40:40 -04:00
orignal
dbe427d5eb set reply code for short tunnel build messages 2021-07-11 19:29:16 -04:00
orignal
15c3d46492 encrypt inbound tunnel build message for short tunnel build only 2021-07-10 17:28:18 -04:00
orignal
6a467a09bd fixed build error 2021-07-10 16:47:28 -04:00
orignal
ba1b8c7c2b WrapECIESX25519MessageForRouter wihout session 2021-07-10 16:15:15 -04:00
orignal
1e9eb30aa3 garlic encryption of inbound tunnel build message 2021-07-10 14:33:23 -04:00
orignal
d47bf1bada different tunnel build record size 2021-07-09 19:26:14 -04:00
orignal
59dd60f5cb genarate keys in CreateBuildRequestRecord 2021-07-09 19:24:28 -04:00
orignal
c02a0c4da9 process DELAY_REQUESTED option 2021-07-08 22:22:00 -04:00
orignal
84f6024cc9 locate record to build inside CreateBuildRequestRecord 2021-07-08 19:00:25 -04:00
orignal
d73b42b726 extract ret code per hop 2021-07-08 16:39:38 -04:00
orignal
ed0c2e68a5 DecryptRecord per tunnel hop 2021-07-07 21:16:30 -04:00
orignal
847225c6bf more yggdrasil reseeds added 2021-07-07 08:24:01 -04:00
orignal
a6294df9e8 decrypt one-time message encrypted with tag on router 2021-07-06 20:15:55 -04:00
orignal
9000b3df4e KDF for short tunnel build messages 2021-07-05 14:31:07 -04:00
orignal
a717542733 update yggdrasil reseed to 0.4 2021-07-04 07:33:28 -04:00
orignal
aace644815 added ShortECIESTunnelHopConfig 2021-07-02 22:06:24 -04:00
orignal
0ae170531e different ElGamal and ECIES hops configs 2021-07-02 15:41:33 -04:00