mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-13 15:47:15 +03:00
die if target cannot be resolved (otherwise, we segfault when printing the settings or later)
This commit is contained in:
parent
7808a3a766
commit
a7f0c456ab
@ -312,7 +312,10 @@ static int config_protocols(config_t *config, struct proto **prots)
|
||||
p->log_level = 1;
|
||||
}
|
||||
|
||||
resolve_split_name(&(p->saddr), hostname, port);
|
||||
if (resolve_split_name(&(p->saddr), hostname, port)) {
|
||||
fprintf(stderr, "line %d: cannot resolve %s:%s\n", config_setting_source_line(prot), hostname, port);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
p->probe = get_probe(name);
|
||||
if (!p->probe || !strcmp(name, "sni_alpn")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user