summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-12-09 15:07:28 (GMT)
committerSwift Review <review@swift.im>2015-12-17 18:21:38 (GMT)
commit29e8802886c0cb881e08a60cf0ea104e67577253 (patch)
treef824749084f7eaacac5f0df7bb386414047da149
parent2dbf59832c5410e568b72fa908c5f40f24deec64 (diff)
downloadswift-29e8802886c0cb881e08a60cf0ea104e67577253.zip
swift-29e8802886c0cb881e08a60cf0ea104e67577253.tar.bz2
Do not advertise link-local IPv6 addresses in FT candidates
Test-Information: Ran a file-transfer between two Swift instances and verified no fe80:... addresses are included in the candidates. Change-Id: I51dedb6aff95686764f74bf61ab2963e51ecbd1c
-rw-r--r--Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp
index fd0e571..f6e6963 100644
--- a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp
+++ b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp
@@ -142,6 +142,10 @@ void LocalJingleTransportCandidateGenerator::emitOnLocalTransportCandidatesGener
// get direct candidates
std::vector<HostAddressPort> directCandidates = s5bServerManager->getHostAddressPorts();
foreach(HostAddressPort addressPort, directCandidates) {
+ if (addressPort.getAddress().getRawAddress().is_v6() &&
+ addressPort.getAddress().getRawAddress().to_v6().is_link_local()) {
+ continue;
+ }
JingleS5BTransportPayload::Candidate candidate;
candidate.type = JingleS5BTransportPayload::Candidate::DirectType;
candidate.jid = ownJID;