aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
AgeCommit message (Collapse)Author
2012-09-10Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
Conflicts: src/net.cpp
2012-09-10Merge branch '0.4.x' into 0.5.xLuke Dashjr
2012-09-10select(): Use precise fd presence check, rather than imprecise hSocketMax testJeff Garzik
2012-09-10Bugfix: Don't consider invalid listening socket in hSocketMaxLuke Dashjr
Fixed upstream in 8f10a2889089af1b2ac64802360494b54c8c7ff1.
2012-08-12Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
Conflicts: src/key.h src/keystore.h src/net.h src/protocol.cpp src/qt/guiutil.h src/test/DoS_tests.cpp
2012-08-12Merge branch '0.4.x' into 0.5.xLuke Dashjr
Conflicts: src/net.cpp
2012-08-12Bugfix: Fix a variety of misspellingsLuke Dashjr
(PARTIAL: Left out anything changing debug.log)
2012-07-06Merge branch '0.4.x' into 0.5.xLuke Dashjr
2012-07-06Do not consider inbound peers for outbound network group exclusion.Gregory Maxwell
Bitcoin will not make an outbound connection to a network group (/16 for IPv4) that it is already connected to. This means that if an attacker wants good odds of capturing all a nodes outbound connections he must have hosts on a a large number of distinct groups. Previously both inbound and outbound connections were used to feed this exclusion. The use of inbound connections, which can be controlled by the attacker, actually has the potential of making sibyl attacks _easier_: An attacker can start up hosts in groups which house many honest nodes and make outbound connections to the victim to exclude big swaths of honest nodes. Because the attacker chooses to make the outbound connection he can always beat out honest nodes for the consumption of inbound slots. At _best_ the old behavior increases attacker costs by a single group (e.g. one distinct group to use to fill up all your inbound slots), but at worst it allows the attacker to select whole networks you won't connect to. This commit makes the nodes use only outbound links to exclude network groups for outbound connections. Fancier things could be done, like weaker exclusion for inbound groups... but simplicity is good and I don't believe more complexity is currently needed.
2012-07-06Do not consider inbound peers for outbound network group exclusion.Gregory Maxwell
Bitcoin will not make an outbound connection to a network group (/16 for IPv4) that it is already connected to. This means that if an attacker wants good odds of capturing all a nodes outbound connections he must have hosts on a a large number of distinct groups. Previously both inbound and outbound connections were used to feed this exclusion. The use of inbound connections, which can be controlled by the attacker, actually has the potential of making sibyl attacks _easier_: An attacker can start up hosts in groups which house many honest nodes and make outbound connections to the victim to exclude big swaths of honest nodes. Because the attacker chooses to make the outbound connection he can always beat out honest nodes for the consumption of inbound slots. At _best_ the old behavior increases attacker costs by a single group (e.g. one distinct group to use to fill up all your inbound slots), but at worst it allows the attacker to select whole networks you won't connect to. This commit makes the nodes use only outbound links to exclude network groups for outbound connections. Fancier things could be done, like weaker exclusion for inbound groups... but simplicity is good and I don't believe more complexity is currently needed.
2012-06-14Use std::numeric_limits<> for typesafe INT_MAX/etcGavin Andresen
(this fixes a Mac OS X gitian build error for 0.5.x)
2012-06-14Use std::numeric_limits<> for typesafe INT_MAX/etcGavin Andresen
(this fixes a Mac OS X gitian build error for 0.5.x)
2012-06-14Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
Conflicts: src/main.h src/net.cpp src/serialize.h
2012-06-14Merge branch '0.4.x' into 0.5.xLuke Dashjr
Conflicts: doc/release-process.txt src/serialize.h
2012-06-14Bugfix: Fix various places where Bitcoin-Qt was being shutdown improperlyPhilip Kaufmann
(Partial/merge of upstream 9247134eaba9a1d0fa74f22de238af1476663005, 1a3f0da9229a8e524d1010cdc8bd3b9da71fe529, and 3e343522226e6c249f5cb05436eec347b87c6361)
2012-06-06fix an incorrect if-clause in net.cppPhilip Kaufmann
2012-05-20Update License in File HeadersFordy
I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
2012-05-20Update License in File HeadersFordy
I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
2012-05-20Update License in File HeadersFordy
I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
2012-04-27We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)Timothy Redaelli
2012-04-27We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)Timothy Redaelli
2012-04-27We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)Timothy Redaelli
2012-04-22Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
Conflicts: src/main.h src/net.cpp src/util.cpp
2012-04-22Merge branch '0.4.x' into 0.5.xLuke Dashjr
Conflicts: src/main.cpp
2012-04-17Fix loop index var types, fixing many minor sign comparison warningsJeff Garzik
foo.size() typically returns an unsigned integral type; make loop variables match those types' signedness.
2012-04-17Fix loop index var types, fixing many minor sign comparison warningsJeff Garzik
foo.size() typically returns an unsigned integral type; make loop variables match those types' signedness.
2012-04-17The string class returns string::npos, when find() fails.Jeff Garzik
Noticed when sign-comparison warnings were enabled.
2012-04-15fix warnings: unused variable 'XX' [-Wunused-variable]Wladimir J. van der Laan
2012-03-26Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
2012-03-25Give DNS seeds a random age between 3 and 7 days oldPieter Wuille
This speeds up initial connections with an old/large addr.dat a lot.
2012-03-22When disconnecting a node, clear the received buffer so that we doAlistair Buxton
not process any already received messages. The primary reason to do this is if a node spams hundreds of messages and we ban them, we don't want to continue processing the rest of it.
2012-03-22Merge branch 'addrman' of https://github.com/sipa/bitcoinGavin Andresen
2012-03-18When disconnecting a node, clear the received buffer so that we doAlistair Buxton
not process any already received messages. The primary reason to do this is if a node spams hundreds of messages and we ban them, we don't want to continue processing the rest of it.
2012-03-06fix typo src/net.cppnomnombtc
2012-03-05fix typo src/net.cppnomnombtc
2012-02-26bitcoind changes to stop storing settings in wallet.dat.Gavin Andresen
2012-02-24CAddrMan: stochastic address managerPieter Wuille
Design goals: * Only keep a limited number of addresses around, so that addr.dat does not grow without bound. * Keep the address tables in-memory, and occasionally write the table to addr.dat. * Make sure no (localized) attacker can fill the entire table with his nodes/addresses. See comments in addrman.h for more detailed information.
2012-02-19Fix #626: RecvLine wrong error messagePieter Wuille
Also moved RecvLine to net.cpp.
2012-02-17Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
2012-02-17Several shutdown-related fixesPieter Wuille
* do not let vnThreadsRunning[1] go negative * do not perform locking operations while vnThreadsRunning[1] is decreased * check vnThreadsRunning[1] at exit
2012-02-17Bugfix: do not create CAddress for invalid acceptsPieter Wuille
2012-02-16Symbolic names for threadsPieter Wuille
Introduce an enum threadId, and use symbolic indices when accessing vnThreadsRunning.
2012-02-16Merge pull request #844 from sipa/shutdownfixPieter Wuille
Several shutdown-related fixes
2012-02-15Several shutdown-related fixesPieter Wuille
* do not let vnThreadsRunning[1] go negative * do not perform locking operations while vnThreadsRunning[1] is decreased * check vnThreadsRunning[1] at exit
2012-02-15Bugfix: do not create CAddress for invalid acceptsPieter Wuille
2012-02-11Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
2012-02-11Get ext. IP from UPnP, make sure addrMe IsRoutable() in version.Matt Corallo
This fixes a potential bug where some NATs may replace the node's interal IP with its external IP in version messages, causing incorrect checksums when version messages begin being checksummed on February 14, 2012.
2012-02-10Get ext. IP from UPnP, make sure addrMe IsRoutable() in version.Matt Corallo
This fixes a potential bug where some NATs may replace the node's interal IP with its external IP in version messages, causing incorrect checksums when version messages begin being checksummed on February 14, 2012.
2012-02-07Update copyrights to 2012 for files modified this yearLuke Dashjr
2012-02-07Update copyrights to 2012 for files modified this yearLuke Dashjr