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> | 2019-07-21 20:59:35 +0100 |
commit | a8305cde195225a2ca7b3384cb4c2d1290ed0867 (patch) | |
tree | 5777b5645909f4994ad664a0bbfa193b27989de9 /src | |
parent | 181fb5e9e80249d6b4aec6e3a31168d8bf856fcd (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')
-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 987962e..823f96a 100644 --- a/src/conf_parser.y +++ b/src/conf_parser.y @@ -2110,8 +2110,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); @@ -2135,6 +2134,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)); |