Allow the use of TCP instead of UDP for queries by setting options usevc

in resolv.conf which sets RES_USEVC.

Reviewed by:	ume
MFC after:	17 days
Differential Revision:	https://reviews.freebsd.org/D16607
This commit is contained in:
Bjoern A. Zeeb 2018-08-16 13:18:40 +00:00
parent a24d3c094e
commit 8489ecae84
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=337904
2 changed files with 7 additions and 1 deletions

View File

@ -679,6 +679,8 @@ res_setoptions(res_state statp, const char *options, const char *source)
statp->options |= RES_INSECURE2;
} else if (!strncmp(cp, "rotate", sizeof("rotate") - 1)) {
statp->options |= RES_ROTATE;
} else if (!strncmp(cp, "usevc", sizeof("usevc") - 1)) {
statp->options |= RES_USEVC;
} else if (!strncmp(cp, "no-check-names",
sizeof("no-check-names") - 1)) {
statp->options |= RES_NOCHECKNAME;

View File

@ -28,7 +28,7 @@
.\" @(#)resolver.5 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
.Dd October 12, 2015
.Dd August 16, 2018
.Dt RESOLVER 5
.Os
.Sh NAME
@ -127,6 +127,10 @@ is one of the following:
sets
.Dv RES_DEBUG
in _res.options.
.It Sy usevc
sets
.Dv RES_USEVC
to use TCP instead of UDP for queries.
.It Sy ndots: Ns Ar n
sets a threshold for the number of dots which must appear in a name given to
.Fn res_query