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