Merge pull request #1191 from G10h4ck/IPv6-v3

IPv6 support
This commit is contained in:
csoler 2018-03-27 20:54:31 +02:00 committed by GitHub
commit 73c6deebf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 838 additions and 689 deletions

View file

@ -174,24 +174,24 @@ RsCertificate::RsCertificate(const RsPeerDetails& Detail, const unsigned char *b
try
{
scan_ip(Detail.localAddr,Detail.localPort,ipv4_internal_ip_and_port) ;
scan_ip(Detail.localAddr,Detail.localPort,ipv4_internal_ip_and_port);
}
catch(...)
{
std::cerr << "RsCertificate::Invalid LocalAddress";
std::cerr << std::endl;
memset(ipv4_internal_ip_and_port,0,6) ;
std::cerr << "RsCertificate::Invalid LocalAddress: "
<< Detail.localAddr << std::endl;
memset(ipv4_internal_ip_and_port,0,6);
}
try
{
scan_ip(Detail.extAddr,Detail.extPort,ipv4_external_ip_and_port) ;
scan_ip(Detail.extAddr,Detail.extPort,ipv4_external_ip_and_port);
}
catch(...)
{
std::cerr << "RsCertificate::Invalid ExternalAddress";
std::cerr << std::endl;
std::cerr << "RsCertificate::Invalid ExternalAddress: "
<< Detail.extAddr << std::endl;
memset(ipv4_external_ip_and_port,0,6) ;
}