summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/m_connect.c16
-rw-r--r--src/conf_parser.y7
2 files changed, 21 insertions, 2 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
diff --git a/src/conf_parser.y b/src/conf_parser.y
index e91f79d..a15eb6a 100644
--- a/src/conf_parser.y
+++ b/src/conf_parser.y
@@ -2103,8 +2103,7 @@ connect_entry: CONNECT
!block_state.cert.buf[0])
break;
- if (has_wildcards(block_state.name.buf) ||
- has_wildcards(block_state.host.buf))
+ if (has_wildcards(block_state.name.buf))
break;
conf = conf_make(CONF_SERVER);
@@ -2128,6 +2127,10 @@ connect_entry: CONNECT
dlinkMoveList(&block_state.leaf.list, &conf->leaf_list);
dlinkMoveList(&block_state.hub.list, &conf->hub_list);
+ /* if the host has wildcards, we can't connect */
+ if (has_wildcards(block_state.host.buf))
+ conf->flags &= ~CONF_FLAGS_ALLOW_AUTO_CONN;
+
if (block_state.bind.buf[0])
{
memset(&hints, 0, sizeof(hints));