add port filtering if 0 for address list

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1813 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-11-11 22:13:07 +00:00
parent e0543329ad
commit 6a656eeabc

View File

@ -3782,9 +3782,9 @@ void peerConnectState::updateIpAddressList(IpAddressTimed ipTimed) { //purge old
std::cerr << ":" << ntohs(ipTimed.ipAddr.sin_port);
std::cerr << std::endl;
#endif
if (ipTimed.ipAddr.sin_addr.s_addr == 0) {
if (ipTimed.ipAddr.sin_addr.s_addr == 0 || ipTimed.ipAddr.sin_port == 0) {
#ifdef CONN_DEBUG
std::cerr << "peerConnectState::updateIpAdressList() ip parameter is 0.0.0.0, do nothing." << std::endl;
std::cerr << "peerConnectState::updateIpAdressList() ip parameter is 0.0.0.0 or port is 0, ignoring." << std::endl;
#endif
return;
}