From 29e8802886c0cb881e08a60cf0ea104e67577253 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Wed, 9 Dec 2015 16:07:28 +0100 Subject: 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 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 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; -- cgit v0.10.2-6-g49f6