mirror of https://github.com/getdnsapi/getdns.git
Fix output of get_api_settings functions
This commit is contained in:
parent
f0bd64d57a
commit
1f9424ccf2
|
@ -2922,6 +2922,7 @@ _get_context_settings(getdns_context* context)
|
||||||
}
|
}
|
||||||
/* int fields */
|
/* int fields */
|
||||||
r = getdns_dict_set_int(result, "timeout", context->timeout);
|
r = getdns_dict_set_int(result, "timeout", context->timeout);
|
||||||
|
r = getdns_dict_set_int(result, "idle_timeout", context->idle_timeout);
|
||||||
r |= getdns_dict_set_int(result, "limit_outstanding_queries", context->limit_outstanding_queries);
|
r |= getdns_dict_set_int(result, "limit_outstanding_queries", context->limit_outstanding_queries);
|
||||||
r |= getdns_dict_set_int(result, "dnssec_allowed_skew", context->dnssec_allowed_skew);
|
r |= getdns_dict_set_int(result, "dnssec_allowed_skew", context->dnssec_allowed_skew);
|
||||||
r |= getdns_dict_set_int(result, "follow_redirects", context->follow_redirects);
|
r |= getdns_dict_set_int(result, "follow_redirects", context->follow_redirects);
|
||||||
|
@ -3392,15 +3393,22 @@ getdns_context_get_upstream_recursive_servers(getdns_context *context,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (upstream->transport == GETDNS_TRANSPORT_TLS) {
|
if (upstream->transport == GETDNS_TRANSPORT_TLS) {
|
||||||
if (upstream_port(upstream) == getdns_port_array[j])
|
if (upstream_port(upstream) != getdns_port_array[j] &&
|
||||||
(void) getdns_dict_set_int(d, "tls_port",
|
(r = getdns_dict_set_int(d, "tls_port",
|
||||||
(uint32_t) upstream_port(upstream));
|
(uint32_t) upstream_port(upstream))))
|
||||||
|
break;
|
||||||
|
if (upstream->tls_auth_name[0] != '\0' &&
|
||||||
|
(r = getdns_dict_util_set_string(d,
|
||||||
|
"tls_auth_name",
|
||||||
|
upstream->tls_auth_name)))
|
||||||
|
break;
|
||||||
if (upstream->tls_pubkey_pinset) {
|
if (upstream->tls_pubkey_pinset) {
|
||||||
getdns_list *pins = NULL;
|
getdns_list *pins = NULL;
|
||||||
if (_getdns_get_pubkey_pinset_list(context,
|
if ((_getdns_get_pubkey_pinset_list(context,
|
||||||
upstream->tls_pubkey_pinset,
|
upstream->tls_pubkey_pinset,
|
||||||
&pins) == GETDNS_RETURN_GOOD)
|
&pins) == GETDNS_RETURN_GOOD) &&
|
||||||
(void) getdns_dict_set_list(d, "tls_pubkey_pinset", pins);
|
(r = getdns_dict_set_list(d, "tls_pubkey_pinset", pins)))
|
||||||
|
break;
|
||||||
getdns_list_destroy(pins);
|
getdns_list_destroy(pins);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -458,6 +458,7 @@ print_usage(FILE *out, const char *progname)
|
||||||
{
|
{
|
||||||
fprintf(out, "usage: %s [<option> ...] \\\n"
|
fprintf(out, "usage: %s [<option> ...] \\\n"
|
||||||
"\t\t[@<upstream> ...] [+<extension> ...] [<name>] [<type>]\n", progname);
|
"\t\t[@<upstream> ...] [+<extension> ...] [<name>] [<type>]\n", progname);
|
||||||
|
fprintf(out, "\ndefault mode: recursive, synchronous resolution of NS record using UDP with TCP fallback\n");
|
||||||
fprintf(out, "\nupstreams: @<ip>[%%<scope_id>][@<port>][#<tls port>][~<tls name>][^<tsig spec>]\n");
|
fprintf(out, "\nupstreams: @<ip>[%%<scope_id>][@<port>][#<tls port>][~<tls name>][^<tsig spec>]\n");
|
||||||
fprintf(out, "\ntsig spec: [<algorithm>:]<name>:<secret in Base64>\n");
|
fprintf(out, "\ntsig spec: [<algorithm>:]<name>:<secret in Base64>\n");
|
||||||
fprintf(out, "\nextensions:\n");
|
fprintf(out, "\nextensions:\n");
|
||||||
|
@ -519,7 +520,7 @@ print_usage(FILE *out, const char *progname)
|
||||||
fprintf(out, "\t-O\tSet transport to TCP only keep connections open\n");
|
fprintf(out, "\t-O\tSet transport to TCP only keep connections open\n");
|
||||||
fprintf(out, "\t-L\tSet transport to TLS only keep connections open\n");
|
fprintf(out, "\t-L\tSet transport to TLS only keep connections open\n");
|
||||||
fprintf(out, "\t-E\tSet transport to TLS with TCP fallback only keep connections open\n");
|
fprintf(out, "\t-E\tSet transport to TLS with TCP fallback only keep connections open\n");
|
||||||
fprintf(out, "\t-u\tSet transport to UDP with TCP fallback\n");
|
fprintf(out, "\t-u\tSet transport to UDP with TCP fallback (default)\n");
|
||||||
fprintf(out, "\t-U\tSet transport to UDP only\n");
|
fprintf(out, "\t-U\tSet transport to UDP only\n");
|
||||||
fprintf(out, "\t-l <transports>\tSet transport list. List can contain 1 of each of the characters\n");
|
fprintf(out, "\t-l <transports>\tSet transport list. List can contain 1 of each of the characters\n");
|
||||||
fprintf(out, "\t\t\t U T L S for UDP, TCP or TLS e.g 'UT' or 'LTU' \n");
|
fprintf(out, "\t\t\t U T L S for UDP, TCP or TLS e.g 'UT' or 'LTU' \n");
|
||||||
|
|
Loading…
Reference in New Issue