summaryrefslogtreecommitdiff
path: root/sbin/resolvd/resolvd.8
blob: 3209af08f4dee57d2394b5a34b2243451f31275e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
.\"	$OpenBSD: resolvd.8,v 1.9 2021/11/11 05:52:03 bket Exp $
.\"
.\" Copyright (c) 2021 Florian Obser <florian@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: November 11 2021 $
.Dt RESOLVD 8
.Os
.Sh NAME
.Nm resolvd
.Nd a daemon to handle nameserver configuration
.Sh SYNOPSIS
.Nm
.Op Fl dv
.Sh DESCRIPTION
.Nm
handles the contents of
.Pa /etc/resolv.conf ,
which contains details of the system's DNS nameservers, and is
read by the resolver routines in the C library.
Nameservers are learned from various sources, incorporated in a priority
order, then user-edited information found in the pre-existing file is
re-appended.
.Pp
.Nm
checks whether
.Xr unwind 8
is running, and if so places
.Pp
.Dl nameserver 127.0.0.1
.Pp
at the top, to cause local resolution.
.Pp
.Nm
also monitors the routing socket for proposals learned by
.Xr dhclient 8 ,
.Xr dhcpleased 8 ,
.Xr slaacd 8 ,
or network devices which natively learn DNS information such as
.Xr sppp 4
or
.Xr umb 4 .
Proposals can also be sent using the
.Xr route 8
.Cm nameserver
command.
.Pp
These proposals are added in priority order, but commented out
if
.Xr unwind 8
is running.
.Pp
After that,
.Nm
appends all user-edited lines found in the file.
.Pp
.Nm
also notices if the
.Pa /etc/resolv.conf
file is edited, and will rewrite the file, re-blending the various
pieces of information.
It will also create
.Pa /etc/resolv.conf
if it does not exist or if it is empty.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl d
Do not daemonize.
If this option is specified,
.Nm
will run in the foreground and log to
.Em stderr .
.It Fl v
Produce more verbose output.
.El
.Sh SEE ALSO
.Xr resolv.conf 5 ,
.Xr dhclient 8 ,
.Xr dhcpleased 8 ,
.Xr route 8 ,
.Xr slaacd 8 ,
.Xr unwind 8
.Sh HISTORY
The
.Nm
program first appeared in
.Ox 6.9 .