aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge #8707: net: fix maxuploadtarget settingWladimir J. van der Laan2016-09-191-2/+3
|\ \ | |/ |/| | | f3552da net: fix maxuploadtarget setting (Cory Fields)
| * net: fix maxuploadtarget settingCory Fields2016-09-141-2/+3
| | | | | | | | | | | | | | | | | | This was broken by 63cafa6329e1a. Note that while this fixes the settings, it doesn't fix the actual usage of -maxuploadtarget completely, as there is currently a bug in the nOptimisticBytesWritten accounting that causes a delayed response if the target is reached. That bug will be addressed separately.
* | net: No longer send local address in addrMeWladimir J. van der Laan2016-09-151-1/+1
|/ | | | | | | | | After #8594 the addrFrom sent by a node is not used anymore at all, so don't bother sending it. Also mitigates the privacy issue in (#8616). It doesn't completely solve the issue as GetLocalAddress is also called in AdvertiseLocal, but at least when advertising addresses it stands out less as *our* address.
* Merge #8715: net: only delete CConnman if it's been createdWladimir J. van der Laan2016-09-141-0/+1
|\ | | | | | | 36fa01f net: only delete CConnman if it's been created (Cory Fields)
| * net: only delete CConnman if it's been createdCory Fields2016-09-131-0/+1
| | | | | | | | | | | | | | | | In the case of (for example) an already-running bitcoind, the shutdown sequence begins before CConnman has been created, leading to a null-pointer dereference when g_connman->Stop() is called. Instead, Just let the CConnman dtor take care of stopping.
* | Remove maxuploadtargets recommended minimumJonas Schnelli2016-09-131-4/+0
|/
* net: move MAX_FEELER_CONNECTIONS into connmanCory Fields2016-09-081-9/+5
|
* Convert ForEachNode* functions to take a templated function argument rather ↵Jeremy Rubin2016-09-081-73/+0
| | | | than a std::function to eliminate std::function overhead
* Made the ForEachNode* functions in src/net.cpp more pragmatic and self ↵Jeremy Rubin2016-09-081-4/+33
| | | | documenting
* net: move vNodesDisconnected into CConnmanCory Fields2016-09-081-2/+0
|
* net: add nSendBufferMaxSize/nReceiveFloodSize to CConnection::OptionsCory Fields2016-09-081-2/+2
|
* net: Introduce CConnection::Options to avoid passing so many paramsCory Fields2016-09-081-7/+7
|
* net: Drop StartNode/StopNode and use CConnman directlyCory Fields2016-09-081-22/+2
|
* net: pass CClientUIInterface into CConnmanCory Fields2016-09-081-10/+17
|
* net: Pass best block known height into CConnmanCory Fields2016-09-081-12/+24
| | | | | | | | | | | | | | | | | | | | CConnman then passes the current best height into CNode at creation time. This way CConnman/CNode have no dependency on main for height, and the signals only move in one direction. This also helps to prevent identity leakage a tiny bit. Before this change, an attacker could theoretically make 2 connections on different interfaces. They would connect fully on one, and only establish the initial connection on the other. Once they receive a new block, they would relay it to your first connection, and immediately commence the version handshake on the second. Since the new block height is reflected immediately, they could attempt to learn whether the two connections were correlated. This is, of course, incredibly unlikely to work due to the small timings involved and receipt from other senders. But it doesn't hurt to lock-in nBestHeight at the time of connection, rather than letting the remote choose the time.
* net: move max/max-outbound to CConnmanCory Fields2016-09-081-11/+13
|
* net: move semOutbound to CConnmanCory Fields2016-09-081-2/+1
|
* net: move nLocalServices/nRelevantServices to CConnmanCory Fields2016-09-081-14/+18
| | | | | These are in-turn passed to CNode at connection time. This allows us to offer different services to different peers (or test the effects of doing so).
* net: move SendBufferSize/ReceiveFloodSize to CConnmanCory Fields2016-09-081-4/+9
|
* net: move send/recv statistics to CConnmanCory Fields2016-09-081-28/+35
|
* net: SocketSendData returns written sizeCory Fields2016-09-081-1/+4
|
* net: move messageHandlerCondition to CConnmanCory Fields2016-09-081-4/+7
|
* net: move nLocalHostNonce to CConnmanCory Fields2016-09-081-2/+12
| | | | | | | | This behavior seems to have been quite racy and broken. Move nLocalHostNonce into CNode, and check received nonces against all non-fully-connected nodes. If there's a match, assume we've connected to ourself.
* net: move nLastNodeId to CConnmanCory Fields2016-09-081-13/+11
|
* net: move whitelist functions into CConnmanCory Fields2016-09-081-6/+3
|
* net: create generic functor accessors and move vNodes to CConnmanCory Fields2016-09-081-19/+64
|
* net: Add most functions needed for vNodes to CConnmanCory Fields2016-09-081-0/+66
|
* net: move added node functions to CConnmanCory Fields2016-09-081-4/+25
|
* net: Add oneshot functions to CConnmanCory Fields2016-09-081-4/+1
|
* net: move ban and addrman functions into CConnmanCory Fields2016-09-081-49/+77
|
* net: handle nodesignals in CConnmanCory Fields2016-09-081-16/+22
|
* net: move OpenNetworkConnection into CConnmanCory Fields2016-09-081-2/+2
|
* net: Move socket binding into CConnmanCory Fields2016-09-081-2/+1
|
* net: Pass CConnman around as neededCory Fields2016-09-081-2/+2
|
* net: Create CConnman to encapsulate p2p connectionsCory Fields2016-09-081-50/+63
|
* net: move CBanDB and CAddrDB out of net.h/cppCory Fields2016-09-081-209/+0
| | | | This will eventually solve a circular dependency
* Merge #8466: [Trivial] Do not shadow variables in networking codeWladimir J. van der Laan2016-09-021-1/+1
|\ | | | | | | b7c349d Do not shadow variables in networking code (Pavel Janík)
| * Do not shadow variables in networking codePavel Janík2016-08-151-1/+1
| |
* | Merge #8462: Move AdvertiseLocal debug output to net categoryPieter Wuille2016-08-251-1/+1
|\ \ | | | | | | | | | f13c1ba Move AdvertiseLocal debug output to net category (Michael Rotarius)
| * | Move AdvertiseLocal debug output to net categoryMichael Rotarius2016-08-051-1/+1
| | |
* | | Added feeler connections increasing good addrs in the tried table.Ethan Heilman2016-08-231-8/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | Tests if addresses are online or offline by briefly connecting to them. These short lived connections are referred to as feeler connections. Feeler connections are designed to increase the number of fresh online addresses in tried by selecting and connecting to addresses in new. One feeler connection is attempted on average once every two minutes. This change was suggested as Countermeasure 4 in Eclipse Attacks on Bitcoin’s Peer-to-Peer Network, Ethan Heilman, Alison Kendler, Aviv Zohar, Sharon Goldberg. ePrint Archive Report 2015/263. March 2015.
* | | Merge #8505: Trivial: Fix typos in various filesWladimir J. van der Laan2016-08-171-1/+1
|\ \ \ | |_|/ |/| | | | | 1aacfc2 various typos (leijurv)
| * | various typosleijurv2016-08-141-1/+1
| |/
* | Merge #8128: Net: Turn net structures into dumb storage classesWladimir J. van der Laan2016-08-151-9/+18
|\ \ | |/ |/| | | | | | | | | | | | | | | | | 9e9d644 net: fixup nits (Cory Fields) 8945384 net: Have LookupNumeric return a CService directly (Cory Fields) 21ba407 net: narrow include scope after moving to netaddress (Cory Fields) 21e5b96 net: move CNetAddr/CService/CSubNet out of netbase (Cory Fields) 1017b8a net: Add direct tests for new CSubNet constructors (Cory Fields) b6c3ff3 net: Split resolving out of CSubNet (Cory Fields) f96c7c4 net: Split resolving out of CService (Cory Fields) 31d6b1d net: Split resolving out of CNetAddr (Cory Fields)
| * net: Have LookupNumeric return a CService directlyCory Fields2016-08-041-4/+2
| | | | | | | | | | | | Also fix up a few small issues: - Lookup with "badip:port" now sets the port to 0 - Don't allow assert to have side-effects
| * net: narrow include scope after moving to netaddressCory Fields2016-07-311-0/+1
| | | | | | | | | | Net functionality is no longer needed for CAddress/CAddrman/etc. now that CNetAddr/CService/CSubNet are dumb storage classes.
| * net: Split resolving out of CServiceCory Fields2016-07-311-6/+11
| |
| * net: Split resolving out of CNetAddrCory Fields2016-07-311-3/+8
| |
* | Merge #8392: Fix several node initialization issuesWladimir J. van der Laan2016-08-041-0/+2
|\ \ | | | | | | | | | | | | | | | 9d4eb9a Do diskspace check before import thread is started (Pieter Wuille) aa59f2e Add extra message to avoid a long 'Loading banlist' (Pieter Wuille) 0fd2a33 Use a signal to continue init after genesis activation (Pieter Wuille)
| * | Add extra message to avoid a long 'Loading banlist'Pieter Wuille2016-07-301-0/+2
| |/