dns-conf: support disable sni name by setting host-name name to '-'

This commit is contained in:
Nick Peng
2022-11-16 00:22:06 +08:00
parent f619ca8f68
commit f6b9a1b81a
3 changed files with 5 additions and 2 deletions

View File

@@ -435,6 +435,9 @@ static int _config_server(int argc, char *argv[], dns_server_type_t type, int de
}
case 'h': {
safe_strncpy(server->hostname, optarg, DNS_MAX_CNAME_LEN);
if (strncmp(server->hostname, "-", 2) == 0) {
server->hostname[0] = '\0';
}
break;
}
case 'H': {