summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-09-02 12:43:13 -0400
committerAttila Molnar <attilamolnar@hush.com>2016-09-02 20:19:30 +0200
commit1e96bca9b075aebec490e6892ef2da2a3048ba12 (patch)
tree4b73c68470bcf51a52a1253684821c9824c2cf4b
parent65667e7cc2f741afdfcfaad40f57d8cab5254633 (diff)
m_spanningtree Allow multiple valid ips for link blocks as a result of SecurityIPResolver
-rw-r--r--src/modules/m_spanningtree/resolvers.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree/resolvers.cpp b/src/modules/m_spanningtree/resolvers.cpp
index 6d5875af2..ded0573af 100644
--- a/src/modules/m_spanningtree/resolvers.cpp
+++ b/src/modules/m_spanningtree/resolvers.cpp
@@ -105,14 +105,17 @@ SecurityIPResolver::SecurityIPResolver(Module* me, DNS::Manager* mgr, const std:
void SecurityIPResolver::OnLookupComplete(const DNS::Query *r)
{
- const DNS::ResourceRecord &ans_record = r->answers[0];
-
for (std::vector<reference<Link> >::iterator i = Utils->LinkBlocks.begin(); i != Utils->LinkBlocks.end(); ++i)
{
Link* L = *i;
if (L->IPAddr == host)
{
- Utils->ValidIPs.push_back(ans_record.rdata);
+ for (std::vector<DNS::ResourceRecord>::const_iterator j = r->answers.begin(); j != r->answers.end(); ++j)
+ {
+ const DNS::ResourceRecord& ans_record = *j;
+ if (ans_record.type == this->question.type)
+ Utils->ValidIPs.push_back(ans_record.rdata);
+ }
break;
}
}