mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
resolvectl: expose new SD_RESOLVED_RELAX_SINGLE_LABEL flag in resolvectl
This commit is contained in:
parent
d0eae64c1f
commit
36418a4792
@ -480,6 +480,21 @@
|
||||
<xi:include href="version-info.xml" xpointer="v254"/></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--relax-single-label=</option><replaceable>BOOL</replaceable></term>
|
||||
|
||||
<listitem><para>Takes a boolean parameter; used in conjunction with <command>query</command>. If
|
||||
true, rules regarding routing of single-label names are relaxed. Defaults to false. By default,
|
||||
lookups of single label names are assumed to refer to local hosts to be resolved via local resolution
|
||||
such as LLMNR or via search domain qualification and are not routed to upstream servers as is. If
|
||||
this option is enabled these rules are disabled and the queries are routed upstream anyway. Also see
|
||||
the <varname>ResolveUnicastSingleLabel=</varname> option in
|
||||
<citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||
which provides a system-wide option that controls this behaviour.</para>
|
||||
|
||||
<xi:include href="version-info.xml" xpointer="v256"/></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<xi:include href="standard-options.xml" xpointer="json" />
|
||||
<xi:include href="standard-options.xml" xpointer="j" />
|
||||
<xi:include href="standard-options.xml" xpointer="no-pager" />
|
||||
|
@ -3342,6 +3342,7 @@ static int native_help(void) {
|
||||
" --synthesize=BOOL Allow synthetic response (default: yes)\n"
|
||||
" --cache=BOOL Allow response from cache (default: yes)\n"
|
||||
" --stale-data=BOOL Allow response from cache with stale data (default: yes)\n"
|
||||
" --relax-single-label=BOOL Allow single label lookups to go upstream (default: no)\n"
|
||||
" --zone=BOOL Allow response from locally registered mDNS/LLMNR\n"
|
||||
" records (default: yes)\n"
|
||||
" --trust-anchor=BOOL Allow response from local trust anchor (default:\n"
|
||||
@ -3701,7 +3702,8 @@ static int native_parse_argv(int argc, char *argv[]) {
|
||||
ARG_SEARCH,
|
||||
ARG_NO_PAGER,
|
||||
ARG_JSON,
|
||||
ARG_STALE_DATA
|
||||
ARG_STALE_DATA,
|
||||
ARG_RELAX_SINGLE_LABEL,
|
||||
};
|
||||
|
||||
static const struct option options[] = {
|
||||
@ -3726,6 +3728,7 @@ static int native_parse_argv(int argc, char *argv[]) {
|
||||
{ "no-pager", no_argument, NULL, ARG_NO_PAGER },
|
||||
{ "json", required_argument, NULL, ARG_JSON },
|
||||
{ "stale-data", required_argument, NULL, ARG_STALE_DATA },
|
||||
{ "relax-single-label", required_argument, NULL, ARG_RELAX_SINGLE_LABEL },
|
||||
{}
|
||||
};
|
||||
|
||||
@ -3912,6 +3915,13 @@ static int native_parse_argv(int argc, char *argv[]) {
|
||||
SET_FLAG(arg_flags, SD_RESOLVED_NO_SEARCH, r == 0);
|
||||
break;
|
||||
|
||||
case ARG_RELAX_SINGLE_LABEL:
|
||||
r = parse_boolean_argument("--relax-single-label=", optarg, NULL);
|
||||
if (r < 0)
|
||||
return r;
|
||||
SET_FLAG(arg_flags, SD_RESOLVED_RELAX_SINGLE_LABEL, r > 0);
|
||||
break;
|
||||
|
||||
case ARG_NO_PAGER:
|
||||
arg_pager_flags |= PAGER_DISABLE;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user