diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2016-06-05 14:43:34 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2016-06-05 17:47:57 +0100 |
commit | 604c6f95a51c23ab77cc08f8c60c296af64bc7fd (patch) | |
tree | b71e6c4fc312934cbb9e3f675b0d3b690b2014a2 /src/conf_parser.y | |
parent | 49b837e4c54b5c1f50d3b9fb8484a7cd1fe6f40a (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 'src/conf_parser.y')
-rw-r--r-- | src/conf_parser.y | 7 |
1 files changed, 5 insertions, 2 deletions
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)); |