mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Merge branch 'insp3' into master.
This commit is contained in:
commit
a31baf263e
2
configure
vendored
2
configure
vendored
@ -216,7 +216,7 @@ if (defined $opt_portable) {
|
||||
$config{SCRIPT_DIR} = $opt_script_dir // $config{BASE_DIR};
|
||||
} elsif (defined $opt_system) {
|
||||
$config{BASE_DIR} = $opt_prefix // '/';
|
||||
$config{BINARY_DIR} = $opt_binary_dir // catdir $config{BASE_DIR}, 'usr/sbin';
|
||||
$config{BINARY_DIR} = $opt_binary_dir // catdir $config{BASE_DIR}, 'usr/bin';
|
||||
$config{CONFIG_DIR} = $opt_config_dir // catdir $config{BASE_DIR}, 'etc/inspircd';
|
||||
$config{DATA_DIR} = $opt_data_dir // catdir $config{BASE_DIR}, 'var/lib/inspircd';
|
||||
$config{EXAMPLE_DIR} = $opt_example_dir // catdir $config{BASE_DIR}, 'usr/share/doc/inspircd';
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
/// $PackageInfo: require_system("arch") argon2 pkgconf
|
||||
/// $PackageInfo: require_system("darwin") argon2 pkg-config
|
||||
/// $PackageInfo: require_system("debian" "9.0") libargon2-0 pkg-config
|
||||
/// $PackageInfo: require_system("debian" "10.0") libargon2-dev pkg-config
|
||||
/// $PackageInfo: require_system("ubuntu" "18.04") libargon2-0-dev pkg-config
|
||||
|
||||
|
||||
|
@ -138,7 +138,7 @@ std::shared_ptr<Link> TreeSocket::AuthRemote(const CommandBase::Params& params)
|
||||
ssliohook->GetCiphersuite(ciphersuite);
|
||||
ServerInstance->SNO.WriteToSnoMask('l', "Negotiated ciphersuite %s on link %s", ciphersuite.c_str(), x->Name.c_str());
|
||||
}
|
||||
else if (!irc::sockets::cidr_mask("127.0.0.0/8").match(capab->remotesa) && !irc::sockets::cidr_mask("::1/128").match(capab->remotesa))
|
||||
else if (capab->remotesa.family() != AF_UNIX && !irc::sockets::cidr_mask("127.0.0.0/8").match(capab->remotesa) && !irc::sockets::cidr_mask("::1/128").match(capab->remotesa))
|
||||
{
|
||||
this->SendError("Non-local server connections MUST be linked with SSL!");
|
||||
return NULL;
|
||||
|
@ -202,7 +202,8 @@ void SpanningTreeUtilities::RefreshIPCache()
|
||||
ValidIPs.clear();
|
||||
for (std::shared_ptr<Link> L : LinkBlocks)
|
||||
{
|
||||
if (!L->Port)
|
||||
bool isunix = L->IPAddr.find('/') != std::string::npos;
|
||||
if (!L->Port && !isunix)
|
||||
{
|
||||
ServerInstance->Logs.Normal(MODNAME, "Ignoring a link block without a port.");
|
||||
/* Invalid link block */
|
||||
@ -213,7 +214,7 @@ void SpanningTreeUtilities::RefreshIPCache()
|
||||
|
||||
irc::sockets::sockaddrs dummy;
|
||||
bool ipvalid = irc::sockets::aptosa(L->IPAddr, L->Port, dummy);
|
||||
if ((L->IPAddr == "*") || (ipvalid))
|
||||
if ((L->IPAddr == "*") || (isunix) || (ipvalid))
|
||||
ValidIPs.push_back(L->IPAddr);
|
||||
else if (this->Creator->DNS)
|
||||
{
|
||||
@ -257,9 +258,19 @@ void SpanningTreeUtilities::ReadConfiguration()
|
||||
for (std::string s; sep.GetToken(s);)
|
||||
L->AllowMasks.push_back(s);
|
||||
|
||||
const std::string path = tag->getString("path");
|
||||
if (path.empty())
|
||||
{
|
||||
L->IPAddr = tag->getString("ipaddr");
|
||||
L->Port = static_cast<unsigned int>(tag->getUInt("port", 0, 0, UINT16_MAX));
|
||||
}
|
||||
else
|
||||
{
|
||||
L->IPAddr = ServerInstance->Config->Paths.PrependData(path);
|
||||
L->Port = 0;
|
||||
}
|
||||
|
||||
L->Name = tag->getString("name");
|
||||
L->IPAddr = tag->getString("ipaddr");
|
||||
L->Port = static_cast<unsigned int>(tag->getUInt("port", 0, 0, UINT16_MAX));
|
||||
L->SendPass = tag->getString("sendpass", tag->getString("password"));
|
||||
L->RecvPass = tag->getString("recvpass", tag->getString("password"));
|
||||
L->Fingerprint = tag->getString("fingerprint");
|
||||
|
Loading…
x
Reference in New Issue
Block a user