+3895. [func] Add the ability to set the DSCP code point to dig.
+ [RT #36546]
+
3894. [bug] Buffers in isc_print_vsnprintf were not properly
initialized leading to potential overflows when
printing out quad values. [RT #36505]
" +[no]multiline (Print records in an expanded format)\n"
" +[no]onesoa (AXFR prints only one soa record)\n"
" +[no]keepopen (Keep the TCP socket open between queries)\n"
+" +[no]dscp[=###] (Set the DSCP value to ### [0..63])\n"
" global d-opts and servers (before host name) affect all queries.\n"
" local d-opts and servers (after host name) affect only that lookup.\n"
" -h (print help and exit)\n"
strncpy(domainopt, value, sizeof(domainopt));
domainopt[sizeof(domainopt)-1] = '\0';
break;
+ case 's': /* dscp */
+ FULLCHECK("dscp");
+ if (!state) {
+ lookup->dscp = -1;
+ break;
+ }
+ if (value == NULL)
+ goto need_value;
+ result = parse_uint(&num, value, 0x3f, "DSCP");
+ if (result != ISC_R_SUCCESS)
+ fatal("Couldn't parse DSCP value");
+ lookup->dscp = num;
+ break;
default:
goto invalid_option;
}
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>+dscp=value</option></term> <listitem>
+ <para>
+ Set the DSCP code point to be used when sending the
+ query. Valid DSCP code points are in the range
+ [0..63]. By default no code point is explictly set.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><option>+[no]edns[=#]</option></term>
<listitem>
#endif
looknew->ednsopts = NULL;
looknew->ednsoptscnt = 0;
+ looknew->dscp = -1;
dns_fixedname_init(&looknew->fdomain);
ISC_LINK_INIT(looknew, link);
ISC_LIST_INIT(looknew->q);
looknew->tsigctx = NULL;
looknew->need_search = lookold->need_search;
looknew->done_as_is = lookold->done_as_is;
+ looknew->dscp = lookold->dscp;
if (lookold->ecs_addr != NULL) {
size_t len = sizeof(isc_sockaddr_t);
check_result(result, "isc_socket_create");
sockcount++;
debug("sockcount=%d", sockcount);
+ if (query->lookup->dscp != -1)
+ isc_socket_dscp(query->sock, query->lookup->dscp);
if (specified_source)
result = isc_socket_bind(query->sock, &bind_address,
ISC_SOCKET_REUSEADDRESS);
check_result(result, "isc_socket_create");
sockcount++;
debug("sockcount=%d", sockcount);
+ if (query->lookup->dscp != -1)
+ isc_socket_dscp(query->sock, query->lookup->dscp);
if (specified_source) {
result = isc_socket_bind(query->sock, &bind_address,
ISC_SOCKET_REUSEADDRESS);