Commit Graph

108 Commits

Author SHA1 Message Date
thunder2
c76141ed65 Added missing initialization in
- pqissl
- pqissludp
- PeerConnectStateBox
- RsTlvBanListEntry
- RsServer
- TcpStream
- PGPCertificateInfo
- peerConnectAddress
- AudioInputConfig
- SpeexInputProcessor
- xProgressBar
- TBoard

Removed unused member:
- xProgressBar


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8611 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2015-07-13 11:03:18 +00:00
thunder2
002b6559be Fixed previous commit.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8468 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2015-06-15 17:52:15 +00:00
thunder2
6e61a3321a Fixed possible null pointer access in p3BitDht::addInternalPeer_locked.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8467 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2015-06-15 17:51:07 +00:00
csoler
b0f7b70ea2 fixed another uninitialised memory read in bitdht
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8445 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2015-06-14 15:46:00 +00:00
csoler
3eb673dc53 fixed 2 uninitialized memory read
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8441 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2015-06-14 15:15:41 +00:00
csoler
047977b645 Started implementation of ban list. For now, just gathers the list of banned IPs from
the DHT and is not used to reject IPs yet (the DHT list is, even if DHT is desactivated).
Next steps: GUI with switch controls, exchange of IP ban lists between friends, handling IP ranges.


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8297 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2015-05-26 21:17:09 +00:00
csoler
5b2ba1e81c - added more debug info to p3LinkMgr
- added check for banned IP from DHT at connection time
- added regular removal of banned IPs from friend IP lists
- increased time of banned IP storage to 1 week (previously 6 hours)
- added save for banned IPs to keep them after restart (in bdfilter.cc) to file bdfilter.txt (can be manually updated)
- changed mFiltered into a std::map for increased search efficiency
- added secondary check of cert ID at connection time.-This line, and those below, will be ignored--

M    libretroshare/src/pqi/p3netmgr.cc
M    libretroshare/src/pqi/pqimonitor.h
M    libretroshare/src/pqi/p3peermgr.cc
M    libretroshare/src/pqi/p3linkmgr.h
M    libretroshare/src/pqi/pqissllistener.cc
M    libretroshare/src/pqi/p3peermgr.h
M    libretroshare/src/pqi/p3linkmgr.cc
M    libretroshare/src/pqi/pqiperson.cc
M    libretroshare/src/pqi/pqissl.cc
M    libretroshare/src/rsserver/rsinit.cc
M    libretroshare/src/dht/p3bitdht_relay.cc
M    libretroshare/src/dht/p3bitdht.cc
M    libretroshare/src/dht/p3bitdht.h
M    libretroshare/src/retroshare/rsdht.h
M    libbitdht/src/udp/udpbitdht.h
M    libbitdht/src/udp/udpbitdht.cc
M    libbitdht/src/bitdht/bdmanager.cc
M    libbitdht/src/bitdht/bdmanager.h
M    libbitdht/src/bitdht/bdnode.h
M    libbitdht/src/bitdht/bdfilter.h
M    libbitdht/src/bitdht/bdfilter.cc
M    libbitdht/src/bitdht/bdnode.cc
M    libbitdht/src/bitdht/bdstore.h


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8289 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2015-05-25 14:02:45 +00:00
csoler
77a33cd445 removed unnecessary debug output
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8153 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2015-04-21 20:09:20 +00:00
csoler
bf11765ff1 fixed a few compilation warnings
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7859 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2015-01-23 08:22:54 +00:00
csoler
4704cc122d Code simplification and suppression of a bug in handling Relay connect attempt (Patch rom G10H4ck)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7820 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2015-01-05 19:34:43 +00:00
csoler
acc45a4382 removed some debug messages, added some ifdefs
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7775 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2014-12-21 19:12:40 +00:00
csoler
d547cb6fdb changed post fixed operator++ into prefixed. More efficient on some systems. Patch from Phenom.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7630 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2014-10-24 22:07:26 +00:00
csoler
b593a918a0 optim: changed postfixed ++ into prefix++ for non trivial operators, replaced test on std::list::size() by std::list::empty() (Patch from Phenom, modified)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7627 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2014-10-21 22:33:02 +00:00
drbob
8d721c7a95 Restore Stunner functionality
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7394 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2014-06-01 09:30:27 +00:00
drbob
0e6302ac6a Removed configuration type (uint32) as its not needed or really used.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7212 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2014-03-29 05:20:57 +00:00
chrisparker126
0f29d28b1b merge of branch v0.6-idclean 7180
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7187 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2014-03-17 20:56:06 +00:00
drbob
34ea22d5f6 Implemented sockaddr_storage functions.
Fixed interfaces for UPnP.

Some further tweaks to get TCP connections working again:
 - hiddenNode issue in p3peers.cc
 - fixed socklen_t for bind() and connect() calls.
 - initialise addr to IPv4 for netmgr.
 - change netAssist (Upnp) interfaces.

Still todo: tou address functions, test UDP functionality.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6755 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-09-24 05:30:01 +00:00
drbob
6290d8fed9 Massive commit - changing from sockaddr_in => sockaddr_storage.
In preparation for making RS support IPv6.

NB: This breaks the build of retroshare-gui, as the
sockaddr_storage_xxx fns are only defined as prototypes for now.

All the aux libraries like udp / stun / tcponudp / dht have still to be converted.

These changes will probably break various things and need to be tested thoroughly.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6735 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-09-13 14:35:19 +00:00
drbob
f519ae1a0d * Added libretroshare internal storage of "Denied Connections" in linkMgr.
* Added a couple of missing #defines.
 * Tweaked dht connect state strings for easy parsing.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6589 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-08-22 07:26:13 +00:00
thunder2
a304ffbab7 Fixed some compiler warnings
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6419 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-06-09 17:54:54 +00:00
drbob
766d156315 Added SystemExternalAccess Function to RPC.
This provides ExternalPort + DHTKey to Client. To be used to find and connect - even if Dynamic IP address changes :)



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6004 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-12-17 19:15:04 +00:00
csoler
9e00688c71 removed debug info
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5563 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-09-17 20:46:23 +00:00
thunder2
a6dfac2a37 Removed std::stringstream.
Removed not necessary include <sstream>.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5112 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-04-19 22:10:00 +00:00
thunder2
4e26884646 Removed some std::ostringstream.
To be continued.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5111 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-04-19 20:44:32 +00:00
thunder2
b71eeadf95 Removed some std::ostringstream.
To be continued.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5109 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-04-18 21:20:37 +00:00
thunder2
9aee68a2a9 Removed some std::ostringstream.
To be continued.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5108 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-04-18 00:00:59 +00:00
thunder2
83bd45caa4 Removed some std::ostringstream.
To be continued.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5103 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-04-14 22:38:24 +00:00
thunder2
0b1126babf Added thread safe function for inet_ntoa in libbitdht.
Used the existing thread safe function for inet_ntoa in libretroshare.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5033 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-03-18 01:33:25 +00:00
thunder2
970d88200d Removed some more compiler warnings from Windows compile (GCC 4.4).
Added -Wextra to the Windows compile.
Added new define in libbitdht for snprintf and fprintf to proper handling of "%ll" under Windows.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4951 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-02-17 10:03:38 +00:00
drbob
87944f251e * Enabled Relays by default.
- This will only effect people who upgrade from a very old version.
 	- Other people will have to switch it on manually.
	- Default is 0 friends, 1 FOF & 1 General @ 1kb/s... max 4kb/s usage per peer.
 * Switched off lots of debugging.
 * Bugfix for natassist (zeroconf returns 0.0.0.0:0 when its doesn't work).
 * Logged IP Addresses for Failed incoming connections.
 * Hacked IP address into the NewsFeed notifications (ugly).



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4827 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-01-20 17:50:19 +00:00
drbob
4aec00a0c2 Attempt at fixing the Disconnection issue.
* Added DataRate accounting to Relay and Dht.
 * Rates are exposed through rsDht.h interface.
 * Added LastIncomingTS() to pqistreamer.
 * Turned HeartBeat reset() into a warning.
 * Added NoPacket in 60 sec reset().
 * Minor typos/errors corrected.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4818 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-01-19 16:23:57 +00:00
drbob
96c9071920 Changes to support Relays.
* added p3BitDht::addKnownNode() so that DhtIds can be used instead of SslIds.
 * switched from bdStdDht() functions to use bdModDht().
 * made DhtFunctions a class variable.
 * added function to modify NodePerBucket() parameter.
 * Bugfix for LinkType. peerConnectAddress.flags was not initialised.
 * Extra debugging of LinkType data (use LINKMGR_DEBUG_LINKTYPE).
 * cleaned up udprelay output.
 * Added Compile Rules to libretroshare.pro for building LocalNet Testing Version. (testnetwork)




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4795 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-01-14 01:54:17 +00:00
drbob
9e5e07d3f0 Reversed Changes for Testing Purposes.
* Disabled lots of debugging.
 * Disabled LOCAL test mode in udpstunner, rsinit
 * Enabled BadPeer checking in bitdht.
 * Restored normal timeout periods for connection attempts.
 * Restored normal connection levels for dht status.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4779 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-01-11 10:24:37 +00:00
drbob
ec05a7cc7d * Moved Relay Packet Debug to a seperate #define.
* Improved Relay Status Output & print when checkRelay() is called.
 * initialise timer variable (mMinuteTS) - was causing checkRelay to never be called.
 * switched to 10 second calling of checkRelay().
 * Increased RELAY lifetimes (x2). now GENERAL = 1 hr, so they can at least transfer 1 meg (minimum block size)
 


git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4777 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-01-10 23:28:33 +00:00
drbob
2b7499e61d More changes for debugging
* Enabled lots of debugging.
 * Switched to shorter timeouts for udprelays.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4763 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-01-08 10:50:33 +00:00
drbob
e232b1d47d Finished up Relay Interface code to p3bitdht.
- RelayServers, Relay Parameters & Relay Mode supported.
 - Store configuration via p3config.
 - New interface code in p3bitdht_relay.cc
 - Updated external interface rsdht.cc



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4730 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-12-20 02:07:00 +00:00
drbob
203fd6bffc Added external interface to control Relay Parameters.
* Modified UdpRelay handles the counting... 
	now each Relay Class has a bandwidth limit, 
	and you can drop down to a lower class - if your one is full.
	This ensures that the desired bandwidth is kept, and allows more friends to use the relays.
 * Added Interface in p3bitdht.

TODO: Test this stuff!



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4728 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-12-19 18:56:11 +00:00
drbob
4d2175636e Added basic ZeroConf interface.
- registers oneself, browses and resolves services.
 - Lots still TODO:
	- parse TxtRecords.
	- Track peers.
	- feedback to libretroshare
	- etc, etc.
Enabled ZeroConf in libretroshare.pro & rsinit.cc. Compiles and runs on OSX.
Added RelayHandler to Dht, to enable external control of Relays.
Marked pqiAssist Interface for changes... will be revamped with ZeroConf.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4727 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-12-13 16:19:37 +00:00
drbob
2048bb5e47 Improvements to BanPeer Code, mainly from a UdpStunner perspective.
* Added UdpStunner::dropStunPeer() code to remove bad peer from stun list.
 * added calls to UdpStunner::dropStunPeer for BanLists going to/from DHT.
 * added  DEBUG_BANLIST_CONDENSE to remove unnecessary debug.
 * Improved UdpStunner::status() print out of stunlist.
 * Added extra check to throw away stun reports where remote_addr == reported ext_addr.
	- This was causing peers to get the wrong IP addresses.
 * Modified UdpStunner ExtAddr checks to make sure the IP addresses match.
 * Changed BANLIST service Id to from Test ID to real ID.

NOTE: These are stop-gap methods to avoid the wrong Stun reports.
A more robust scheme must be implemented. I'd expect that it would
involve a strict initial check to establish your IP address...
(e.g. require 4 peers to confirm it, allowing for some fake entries)
After this we can have a weaker check ensuring IP address matches.
If we detect a likely REAL change of IP address - drop back to requiring
a strick check again.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4717 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-12-08 20:15:08 +00:00
drbob
85ea54395b Improvement to BanPeers Sharing Code.
* Added p3BanList as a service.
 * Added interfaces to communicate addresses.
 * Added debug to p3BanList.
 * Fixed several bugs in the AddEntry/Condense
 * Fixed Mutex deadlocks.

Improvements to Dsdv code too.
 * Added p3Dsdv as a service.
 * Added Function to create a TEST service for routing.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4687 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-11-25 00:58:01 +00:00
drbob
7b0a33c318 Incremental DHT improvement - support in libretroshare.
- Added missing Mutex protection in p3BitDht.
	- Added p3BitDht::addKnownPeer() to communicate with libbitdht.
	- Disabled placeholder versions (addFriend/AddFriendOfFriend)
	- Added netAssistKnownPeer() libretroshare interface.
	- Added calls to netAssistKnownPeer() from p3disc and p3NetMgr.
	- Check for NULL ptr in p3NetMgr before calling p3PeerMgr.
	- Added FIX to maintain MANUAL FORWARD port (untested!)
	- Removed some compiler warnings.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4681 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-11-22 13:24:42 +00:00
drbob
febcfc9bd3 Bugfix: missing TCP connection call - when peer is found on the DHT.
* save IP address for DHT display.
	* store Action in action Queue (the BUG).



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4620 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-09-28 16:01:22 +00:00
thunder2
c6beee44ec Removed unused parameter warnings in libretroshare.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4558 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-08-12 13:42:30 +00:00
drbob
1ee26e3ef2 disabled DIRECT UDP connections...
1) Not always stable, especially if you are firewalled.
2) not needed as a TCP connection can be made!



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4495 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-28 13:05:20 +00:00
drbob
f67da9f8ce * modified code to add PeerId to stunner->exclusiveMode.
* fixed missing releaseExclusiveMode.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4490 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-27 13:56:35 +00:00
drbob
b56ddfeb5b * Switched on Dht "Attach" Mode if RS is firewalled. (and not nice firewall).
* Added interfaces to enable AttachMode switch.
 * Added further tcponudp tests.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4484 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-21 11:28:19 +00:00
drbob
5ff19cf9d7 increased TCP WAIT time to allow external port to stabilize.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4472 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-19 08:14:25 +00:00
drbob
cc9df9a80f Removed Lots of Debug, and fixed a couple of bugs.
* Increased Timeout Periods for UDP connections - this was stopping half of them from succeeding.
 * The other bug (Heartbeat / stream issues) has not been solved.
 * Fixed up initialisation of p3BitDht data. 
 * add DropPeers() as NON-ACTIVE (this allows peers which aren't VISIBLE to still try and connect)
 * export AddFriends/FOF/Others to LinkMgr to allow further SSL IDs to be added to p3BitDht.
 * Export UDP Addresses to DhtWindow.
 * switch off lots of debugging.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4469 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-19 00:06:09 +00:00
drbob
619b2416ac disabled Relay connections, and enabled UDP connections.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4464 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-18 08:37:11 +00:00
drbob
96ec46478a Changes to support the delay / bandwidth changes in libbitdht
* switched off the TESTING PERIODS.
 * added BASE PROXY wait time.
 * Increased PEERNET_CONNECT_TIMEOUT to 120
 * Prevented connection startup with Request underway (dpd->mPeerReqState == RSDHT_PEERREQ_RUNNING)
 * corrected calculation of Exclusive Delay (Target of MIN_DETERMINISTIC_SWITCH_PERIOD = 60 secs).
 * don't do UDP Failed ConnectLogic update when connection was initiated remotely.
 * Extended UdpRelay to allow flexible Bandwidth limits in the future.
 * Added Timeout for Relays (30min for unknowns - 2hrs for friends).
 * Extract bandwidth from UdpRelay, at installation.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4463 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-17 23:41:30 +00:00