summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/capab.cpp12
-rw-r--r--src/modules/m_spanningtree/utils.cpp1
-rw-r--r--src/modules/m_spanningtree/utils.h4
3 files changed, 16 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp
index cd8564892..ac97674f5 100644
--- a/src/modules/m_spanningtree/capab.cpp
+++ b/src/modules/m_spanningtree/capab.cpp
@@ -192,13 +192,23 @@ bool TreeSocket::Capab(const parameterlist &params)
{
reason = "Optional Module list in CAPAB is not alphabetically ordered, cannot compare lists.";
}
- else
+ else if (Utils->AllowOptCommon)
{
ServerInstance->SNO->WriteToSnoMask('l',
"Optional module lists do not match, some commands may not work globally.%s%s%s%s",
diffIneed.length() ? " Not loaded here:" : "", diffIneed.c_str(),
diffUneed.length() ? " Not loaded there:" : "", diffUneed.c_str());
}
+ else
+ {
+ reason = "Optional modules incorrectly matched on these servers, and options::allowmismatch not set.";
+ if (diffIneed.length())
+ reason += " Not loaded here:" + diffIneed;
+ if (diffUneed.length())
+ reason += " Not loaded there:" + diffUneed;
+ this->SendError("CAPAB negotiation failed: "+reason);
+ return false;
+ }
}
if (this->CapKeys.find("PROTOCOL") == this->CapKeys.end())
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index 7c1771557..13a4cc760 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -510,6 +510,7 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind)
FlatLinks = Conf->ReadFlag("security","flatlinks",0);
HideULines = Conf->ReadFlag("security","hideulines",0);
AnnounceTSChange = Conf->ReadFlag("options","announcets",0);
+ AllowOptCommon = Conf->ReadFlag("options", "allowmismatch", 0);
ChallengeResponse = !Conf->ReadFlag("security", "disablehmac", 0);
quiet_bursts = Conf->ReadFlag("performance", "quietbursts", 0);
PingWarnTime = Conf->ReadInteger("options", "pingwarning", 0, true);
diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h
index 9936ebacf..6ac657851 100644
--- a/src/modules/m_spanningtree/utils.h
+++ b/src/modules/m_spanningtree/utils.h
@@ -83,6 +83,10 @@ class SpanningTreeUtilities : public classbase
*/
bool AnnounceTSChange;
+ /** Allow modules marked as VF_OPTCOMMON to be mismatched when linking
+ */
+ bool AllowOptCommon;
+
/** Make snomasks +CQ quiet during bursts and splits
*/
bool quiet_bursts;