summaryrefslogtreecommitdiff
path: root/modules/m_connect.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2016-06-05 14:43:34 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2016-06-05 17:47:57 +0100
commit604c6f95a51c23ab77cc08f8c60c296af64bc7fd (patch)
treeb71e6c4fc312934cbb9e3f675b0d3b690b2014a2 /modules/m_connect.c
parent49b837e4c54b5c1f50d3b9fb8484a7cd1fe6f40a (diff)
Re-allow wildcarded hosts in connect blocks
Wildcarded host blocks allow us to permit a server to connect from unknown IPs, such as is used for ols.ca.linuxnet.org. This feature was broken when upgrading from the hybrid 8.0 to hybrid 8.1 code base. Fix this.
Diffstat (limited to 'modules/m_connect.c')
-rw-r--r--modules/m_connect.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/m_connect.c b/modules/m_connect.c
index 9f77e0e..9a87e9c 100644
--- a/modules/m_connect.c
+++ b/modules/m_connect.c
@@ -109,6 +109,14 @@ mo_connect(struct Client *client_p, struct Client *source_p,
}
}
+ if (has_wildcards(conf->host))
+ {
+ sendto_one(source_p,
+ ":%s NOTICE %s: :Connect: Host %s has no IP",
+ me.name, source_p->name, parv[1]);
+ return 0;
+ }
+
/*
* Get port number from user, if given. If not specified,
* use the default form configuration structure. If missing
@@ -228,6 +236,14 @@ ms_connect(struct Client *client_p, struct Client *source_p,
}
}
+ if (has_wildcards(conf->host))
+ {
+ sendto_one(source_p,
+ ":%s NOTICE %s: :Connect: Host %s has no IP",
+ me.name, source_p->name, parv[1]);
+ return 0;
+ }
+
/*
* Get port number from user, if given. If not specified,
* use the default form configuration structure. If missing