aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
AgeCommit message (Collapse)Author
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.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-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.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-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.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-17The string class returns string::npos, when find() fails.Jeff Garzik
Noticed when sign-comparison warnings were enabled.
2012-03-26Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
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-06fix typo src/net.cppnomnombtc
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-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-07Update copyrights to 2012 for files modified this yearLuke Dashjr
2012-02-07Update copyrights to 2012 for files modified this yearLuke Dashjr
2012-02-02Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
Conflicts: src/main.cpp
2012-02-02Fix UPnP by reannouncing every 20 minutes.Matt Corallo
2012-01-23Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
Conflicts: doc/release-process.txt
2012-01-23Update seednodes, pick long-uptime nodes with version >= 0.4.0Daniel Folkinshteyn
2012-01-23Replace tabs with four spaces to comply with coding standard in doc/coding.txtLars Rasmusson
2012-01-23Replace tabs with four spaces to comply with coding standard in doc/coding.txtLars Rasmusson
2012-01-16Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
2012-01-16Code tidyups, fixing various warnings.Luke Dashjr
Partial cherry pick of: Compile with extra warnings turned on. And more makefile/code tidying up. This turns on most gcc warnings, and removes some unused variables and other code that triggers warnings. Exceptions are: -Wno-sign-compare : triggered by lots of comparisons of signed integer to foo.size(), which is unsigned. -Wno-char-subscripts : triggered by the convert-to-hex functions (I may fix this in a future commit). Conflicts: src/makefile.osx src/makefile.unix src/netbase.cpp src/rpc.cpp
2012-01-03Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
Conflicts: src/util.cpp
2012-01-03Fix issue #659, and cleanup wallet/command-line argument handling a bitGavin Andresen
Conflicts: src/init.cpp src/util.cpp
2012-01-02Fix some address-handling deadlocksPieter Wuille
Made three critical blocks for cs_mapAddresses smaller, and moved writing to the database out of them. This should also improve the concurrency of the code.
2011-12-19Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
2011-12-19Add my DNS seed domainLuke Dashjr
2011-12-19Add sipa's new dnsseed.Matt Corallo
2011-12-12Merge branch '0.4.x' into 0.5.xLuke Dashjr
2011-12-12Merge branch 'restore_old_miniupnp_compat' into 0.4.xLuke Dashjr
2011-12-10Restore compatibility with miniupnpc 1.5 (without breaking miniupnp 1.6)Luke Dashjr
2011-12-02Move DNS Seed lookup to a new thread.Matt Corallo
2011-12-02Move DNS Seed lookup to a new thread.Matt Corallo
2011-11-15Remove vladimir's DNS seed, at his request.Jeff Garzik
2011-10-31Remove vladimir's DNS seed, at his request.Jeff Garzik