History log of /openbsd-current/usr.bin/dig/dighost.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.38 23-Apr-2024 jsg

correct indentation; no functional change
ok tb@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE OPENBSD_7_4_BASE OPENBSD_7_5_BASE
# 1.37 21-Dec-2020 florian

Rewrite parse_netprefix to no longer use isc_sockaddr_fromin{,6}.
Since this was the last user of those functions we can delete them.
OK otto


# 1.36 20-Dec-2020 florian

Fix EDNS Client Subnet option (+subnet=)

This got broken when we introduced ecs_plen so that we can use
natural socket types.


# 1.35 20-Dec-2020 florian

Fix IPv6 link-local address handling for nameservers to talk to as
well as address to bind to.
Reported by Jordan Geoghegan (jordan AT geoghegan.ca), thanks!
Debugged by & initial fix by otto
Input & OK otto


Revision tags: OPENBSD_6_8_BASE
# 1.34 15-Sep-2020 florian

We have sockaddr_storage these days, get rid of isc_sockaddr_t.
OK beck, "beautiful" deraadt


# 1.33 15-Sep-2020 florian

The various sockaddr structures have length fields these days.
OK beck


# 1.32 15-Sep-2020 florian

we no longer need isc_netaddr_t
OK beck, deraadt (who also OK'ed the previous two diffs)


# 1.31 15-Sep-2020 florian

rewrite generating of IPv6 reverse names, lets us get rid of byaddr.
OK beck


# 1.30 15-Sep-2020 florian

Fix botched conversion. This was not converted from parse_uint() which
took a maxlength of 10 but isc_parse_uint32 which took a base of 10
and unlimited lenght. Use a maxval of 128 for prefix lengths instead.


# 1.29 14-Sep-2020 florian

Mechanically replace isc_boolean_t with int.
OK deraadt


# 1.28 14-Sep-2020 florian

Bunch of dead stores and otherwise unused stuff lets us get rid of
unix/net.{c.h}. We need to sprinkle in a few #includes that net.h
dragged in.
OK deraadt


# 1.27 14-Sep-2020 florian

Rewrite isc_time_microdiff() as uelapsed() and put it directly
into dig sources, lets us get rid of unix/time.{c,h}
OK deraadt


# 1.26 13-Sep-2020 florian

Get rid of isc_parse_uint32() and replace it with strtonum.
While here use the standard strtonum error messages.

input & OK beck, OK kn


Revision tags: OPENBSD_6_7_BASE
# 1.25 25-Feb-2020 florian

use timingsafe_bcmp and get rid of now unused safe.c


# 1.24 25-Feb-2020 deraadt

traditional nslookup would not fatal if the server name was undiscoverable.
change lower level code to return an error, and bump the fatal for host(1)
upwards, then tweak nslookup to work nicely


# 1.23 25-Feb-2020 jsg

reduce multiple newlines


# 1.22 24-Feb-2020 florian

Stop generating rdatastruct.h and put the dns_rdata_* structs for
cname, ns, soa, and tsig directly into rdata.h


# 1.21 24-Feb-2020 florian

We only need to create cname, ns, soa and tsig structs.
OK jsg


# 1.20 24-Feb-2020 florian

We only need to fill a wire format buffer from soa and tsig structs.
OK jsg


# 1.19 24-Feb-2020 florian

We only need to free cname, ns, soa and tsig structs.
OK jsg


# 1.18 24-Feb-2020 jsg

remove some uneeded includes


# 1.17 24-Feb-2020 florian

We are always preserving the order of records.
This lets us remove compare_* and casecompare_* functions from
RR types.
OK jung


# 1.16 23-Feb-2020 jung

rmeove more unused functions and code

ok florian


# 1.15 23-Feb-2020 florian

We are not passing options to the message renderer.
OK millert


# 1.14 21-Feb-2020 jung

set function parameter list to void

ok millert florian


# 1.13 21-Feb-2020 florian

Read CLOCK_MONOTONIC when we need timestamps to compare and use
time(3) for the wall clock.
prodding & OK jung


# 1.12 20-Feb-2020 florian

Remove support for reading tsig keys from dnssec key pair.
This was accidentally broken some time ago.
Arguably this was the least useful way of providing tsig keys to
dig. ISC also removed generating tsig keys from dnssec-keygen in 9.13.
To read the key from disk using the -k option it has to be provided as
as a session key:
key "keyname" {
algorithm hmac-sha256;
secret "[...]";
};
OK millert


# 1.11 19-Feb-2020 jung

simplify signal setup and remove block/unblock/is_running/reload

with input from florian

ok millert florian


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.37 21-Dec-2020 florian

Rewrite parse_netprefix to no longer use isc_sockaddr_fromin{,6}.
Since this was the last user of those functions we can delete them.
OK otto


# 1.36 20-Dec-2020 florian

Fix EDNS Client Subnet option (+subnet=)

This got broken when we introduced ecs_plen so that we can use
natural socket types.


# 1.35 20-Dec-2020 florian

Fix IPv6 link-local address handling for nameservers to talk to as
well as address to bind to.
Reported by Jordan Geoghegan (jordan AT geoghegan.ca), thanks!
Debugged by & initial fix by otto
Input & OK otto


Revision tags: OPENBSD_6_8_BASE
# 1.34 15-Sep-2020 florian

We have sockaddr_storage these days, get rid of isc_sockaddr_t.
OK beck, "beautiful" deraadt


# 1.33 15-Sep-2020 florian

The various sockaddr structures have length fields these days.
OK beck


# 1.32 15-Sep-2020 florian

we no longer need isc_netaddr_t
OK beck, deraadt (who also OK'ed the previous two diffs)


# 1.31 15-Sep-2020 florian

rewrite generating of IPv6 reverse names, lets us get rid of byaddr.
OK beck


# 1.30 15-Sep-2020 florian

Fix botched conversion. This was not converted from parse_uint() which
took a maxlength of 10 but isc_parse_uint32 which took a base of 10
and unlimited lenght. Use a maxval of 128 for prefix lengths instead.


# 1.29 14-Sep-2020 florian

Mechanically replace isc_boolean_t with int.
OK deraadt


# 1.28 14-Sep-2020 florian

Bunch of dead stores and otherwise unused stuff lets us get rid of
unix/net.{c.h}. We need to sprinkle in a few #includes that net.h
dragged in.
OK deraadt


# 1.27 14-Sep-2020 florian

Rewrite isc_time_microdiff() as uelapsed() and put it directly
into dig sources, lets us get rid of unix/time.{c,h}
OK deraadt


# 1.26 13-Sep-2020 florian

Get rid of isc_parse_uint32() and replace it with strtonum.
While here use the standard strtonum error messages.

input & OK beck, OK kn


Revision tags: OPENBSD_6_7_BASE
# 1.25 25-Feb-2020 florian

use timingsafe_bcmp and get rid of now unused safe.c


# 1.24 25-Feb-2020 deraadt

traditional nslookup would not fatal if the server name was undiscoverable.
change lower level code to return an error, and bump the fatal for host(1)
upwards, then tweak nslookup to work nicely


# 1.23 25-Feb-2020 jsg

reduce multiple newlines


# 1.22 24-Feb-2020 florian

Stop generating rdatastruct.h and put the dns_rdata_* structs for
cname, ns, soa, and tsig directly into rdata.h


# 1.21 24-Feb-2020 florian

We only need to create cname, ns, soa and tsig structs.
OK jsg


# 1.20 24-Feb-2020 florian

We only need to fill a wire format buffer from soa and tsig structs.
OK jsg


# 1.19 24-Feb-2020 florian

We only need to free cname, ns, soa and tsig structs.
OK jsg


# 1.18 24-Feb-2020 jsg

remove some uneeded includes


# 1.17 24-Feb-2020 florian

We are always preserving the order of records.
This lets us remove compare_* and casecompare_* functions from
RR types.
OK jung


# 1.16 23-Feb-2020 jung

rmeove more unused functions and code

ok florian


# 1.15 23-Feb-2020 florian

We are not passing options to the message renderer.
OK millert


# 1.14 21-Feb-2020 jung

set function parameter list to void

ok millert florian


# 1.13 21-Feb-2020 florian

Read CLOCK_MONOTONIC when we need timestamps to compare and use
time(3) for the wall clock.
prodding & OK jung


# 1.12 20-Feb-2020 florian

Remove support for reading tsig keys from dnssec key pair.
This was accidentally broken some time ago.
Arguably this was the least useful way of providing tsig keys to
dig. ISC also removed generating tsig keys from dnssec-keygen in 9.13.
To read the key from disk using the -k option it has to be provided as
as a session key:
key "keyname" {
algorithm hmac-sha256;
secret "[...]";
};
OK millert


# 1.11 19-Feb-2020 jung

simplify signal setup and remove block/unblock/is_running/reload

with input from florian

ok millert florian


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.36 20-Dec-2020 florian

Fix EDNS Client Subnet option (+subnet=)

This got broken when we introduced ecs_plen so that we can use
natural socket types.


# 1.35 20-Dec-2020 florian

Fix IPv6 link-local address handling for nameservers to talk to as
well as address to bind to.
Reported by Jordan Geoghegan (jordan AT geoghegan.ca), thanks!
Debugged by & initial fix by otto
Input & OK otto


Revision tags: OPENBSD_6_8_BASE
# 1.34 15-Sep-2020 florian

We have sockaddr_storage these days, get rid of isc_sockaddr_t.
OK beck, "beautiful" deraadt


# 1.33 15-Sep-2020 florian

The various sockaddr structures have length fields these days.
OK beck


# 1.32 15-Sep-2020 florian

we no longer need isc_netaddr_t
OK beck, deraadt (who also OK'ed the previous two diffs)


# 1.31 15-Sep-2020 florian

rewrite generating of IPv6 reverse names, lets us get rid of byaddr.
OK beck


# 1.30 15-Sep-2020 florian

Fix botched conversion. This was not converted from parse_uint() which
took a maxlength of 10 but isc_parse_uint32 which took a base of 10
and unlimited lenght. Use a maxval of 128 for prefix lengths instead.


# 1.29 14-Sep-2020 florian

Mechanically replace isc_boolean_t with int.
OK deraadt


# 1.28 14-Sep-2020 florian

Bunch of dead stores and otherwise unused stuff lets us get rid of
unix/net.{c.h}. We need to sprinkle in a few #includes that net.h
dragged in.
OK deraadt


# 1.27 14-Sep-2020 florian

Rewrite isc_time_microdiff() as uelapsed() and put it directly
into dig sources, lets us get rid of unix/time.{c,h}
OK deraadt


# 1.26 13-Sep-2020 florian

Get rid of isc_parse_uint32() and replace it with strtonum.
While here use the standard strtonum error messages.

input & OK beck, OK kn


Revision tags: OPENBSD_6_7_BASE
# 1.25 25-Feb-2020 florian

use timingsafe_bcmp and get rid of now unused safe.c


# 1.24 25-Feb-2020 deraadt

traditional nslookup would not fatal if the server name was undiscoverable.
change lower level code to return an error, and bump the fatal for host(1)
upwards, then tweak nslookup to work nicely


# 1.23 25-Feb-2020 jsg

reduce multiple newlines


# 1.22 24-Feb-2020 florian

Stop generating rdatastruct.h and put the dns_rdata_* structs for
cname, ns, soa, and tsig directly into rdata.h


# 1.21 24-Feb-2020 florian

We only need to create cname, ns, soa and tsig structs.
OK jsg


# 1.20 24-Feb-2020 florian

We only need to fill a wire format buffer from soa and tsig structs.
OK jsg


# 1.19 24-Feb-2020 florian

We only need to free cname, ns, soa and tsig structs.
OK jsg


# 1.18 24-Feb-2020 jsg

remove some uneeded includes


# 1.17 24-Feb-2020 florian

We are always preserving the order of records.
This lets us remove compare_* and casecompare_* functions from
RR types.
OK jung


# 1.16 23-Feb-2020 jung

rmeove more unused functions and code

ok florian


# 1.15 23-Feb-2020 florian

We are not passing options to the message renderer.
OK millert


# 1.14 21-Feb-2020 jung

set function parameter list to void

ok millert florian


# 1.13 21-Feb-2020 florian

Read CLOCK_MONOTONIC when we need timestamps to compare and use
time(3) for the wall clock.
prodding & OK jung


# 1.12 20-Feb-2020 florian

Remove support for reading tsig keys from dnssec key pair.
This was accidentally broken some time ago.
Arguably this was the least useful way of providing tsig keys to
dig. ISC also removed generating tsig keys from dnssec-keygen in 9.13.
To read the key from disk using the -k option it has to be provided as
as a session key:
key "keyname" {
algorithm hmac-sha256;
secret "[...]";
};
OK millert


# 1.11 19-Feb-2020 jung

simplify signal setup and remove block/unblock/is_running/reload

with input from florian

ok millert florian


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.34 15-Sep-2020 florian

We have sockaddr_storage these days, get rid of isc_sockaddr_t.
OK beck, "beautiful" deraadt


# 1.33 15-Sep-2020 florian

The various sockaddr structures have length fields these days.
OK beck


# 1.32 15-Sep-2020 florian

we no longer need isc_netaddr_t
OK beck, deraadt (who also OK'ed the previous two diffs)


# 1.31 15-Sep-2020 florian

rewrite generating of IPv6 reverse names, lets us get rid of byaddr.
OK beck


# 1.30 15-Sep-2020 florian

Fix botched conversion. This was not converted from parse_uint() which
took a maxlength of 10 but isc_parse_uint32 which took a base of 10
and unlimited lenght. Use a maxval of 128 for prefix lengths instead.


# 1.29 14-Sep-2020 florian

Mechanically replace isc_boolean_t with int.
OK deraadt


# 1.28 14-Sep-2020 florian

Bunch of dead stores and otherwise unused stuff lets us get rid of
unix/net.{c.h}. We need to sprinkle in a few #includes that net.h
dragged in.
OK deraadt


# 1.27 14-Sep-2020 florian

Rewrite isc_time_microdiff() as uelapsed() and put it directly
into dig sources, lets us get rid of unix/time.{c,h}
OK deraadt


# 1.26 13-Sep-2020 florian

Get rid of isc_parse_uint32() and replace it with strtonum.
While here use the standard strtonum error messages.

input & OK beck, OK kn


Revision tags: OPENBSD_6_7_BASE
# 1.25 25-Feb-2020 florian

use timingsafe_bcmp and get rid of now unused safe.c


# 1.24 25-Feb-2020 deraadt

traditional nslookup would not fatal if the server name was undiscoverable.
change lower level code to return an error, and bump the fatal for host(1)
upwards, then tweak nslookup to work nicely


# 1.23 25-Feb-2020 jsg

reduce multiple newlines


# 1.22 24-Feb-2020 florian

Stop generating rdatastruct.h and put the dns_rdata_* structs for
cname, ns, soa, and tsig directly into rdata.h


# 1.21 24-Feb-2020 florian

We only need to create cname, ns, soa and tsig structs.
OK jsg


# 1.20 24-Feb-2020 florian

We only need to fill a wire format buffer from soa and tsig structs.
OK jsg


# 1.19 24-Feb-2020 florian

We only need to free cname, ns, soa and tsig structs.
OK jsg


# 1.18 24-Feb-2020 jsg

remove some uneeded includes


# 1.17 24-Feb-2020 florian

We are always preserving the order of records.
This lets us remove compare_* and casecompare_* functions from
RR types.
OK jung


# 1.16 23-Feb-2020 jung

rmeove more unused functions and code

ok florian


# 1.15 23-Feb-2020 florian

We are not passing options to the message renderer.
OK millert


# 1.14 21-Feb-2020 jung

set function parameter list to void

ok millert florian


# 1.13 21-Feb-2020 florian

Read CLOCK_MONOTONIC when we need timestamps to compare and use
time(3) for the wall clock.
prodding & OK jung


# 1.12 20-Feb-2020 florian

Remove support for reading tsig keys from dnssec key pair.
This was accidentally broken some time ago.
Arguably this was the least useful way of providing tsig keys to
dig. ISC also removed generating tsig keys from dnssec-keygen in 9.13.
To read the key from disk using the -k option it has to be provided as
as a session key:
key "keyname" {
algorithm hmac-sha256;
secret "[...]";
};
OK millert


# 1.11 19-Feb-2020 jung

simplify signal setup and remove block/unblock/is_running/reload

with input from florian

ok millert florian


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.34 15-Sep-2020 florian

We have sockaddr_storage these days, get rid of isc_sockaddr_t.
OK beck, "beautiful" deraadt


# 1.33 15-Sep-2020 florian

The various sockaddr structures have length fields these days.
OK beck


# 1.32 15-Sep-2020 florian

we no longer need isc_netaddr_t
OK beck, deraadt (who also OK'ed the previous two diffs)


# 1.31 15-Sep-2020 florian

rewrite generating of IPv6 reverse names, lets us get rid of byaddr.
OK beck


# 1.30 15-Sep-2020 florian

Fix botched conversion. This was not converted from parse_uint() which
took a maxlength of 10 but isc_parse_uint32 which took a base of 10
and unlimited lenght. Use a maxval of 128 for prefix lengths instead.


# 1.29 14-Sep-2020 florian

Mechanically replace isc_boolean_t with int.
OK deraadt


# 1.28 14-Sep-2020 florian

Bunch of dead stores and otherwise unused stuff lets us get rid of
unix/net.{c.h}. We need to sprinkle in a few #includes that net.h
dragged in.
OK deraadt


# 1.27 14-Sep-2020 florian

Rewrite isc_time_microdiff() as uelapsed() and put it directly
into dig sources, lets us get rid of unix/time.{c,h}
OK deraadt


# 1.26 13-Sep-2020 florian

Get rid of isc_parse_uint32() and replace it with strtonum.
While here use the standard strtonum error messages.

input & OK beck, OK kn


Revision tags: OPENBSD_6_7_BASE
# 1.25 25-Feb-2020 florian

use timingsafe_bcmp and get rid of now unused safe.c


# 1.24 25-Feb-2020 deraadt

traditional nslookup would not fatal if the server name was undiscoverable.
change lower level code to return an error, and bump the fatal for host(1)
upwards, then tweak nslookup to work nicely


# 1.23 25-Feb-2020 jsg

reduce multiple newlines


# 1.22 24-Feb-2020 florian

Stop generating rdatastruct.h and put the dns_rdata_* structs for
cname, ns, soa, and tsig directly into rdata.h


# 1.21 24-Feb-2020 florian

We only need to create cname, ns, soa and tsig structs.
OK jsg


# 1.20 24-Feb-2020 florian

We only need to fill a wire format buffer from soa and tsig structs.
OK jsg


# 1.19 24-Feb-2020 florian

We only need to free cname, ns, soa and tsig structs.
OK jsg


# 1.18 24-Feb-2020 jsg

remove some uneeded includes


# 1.17 24-Feb-2020 florian

We are always preserving the order of records.
This lets us remove compare_* and casecompare_* functions from
RR types.
OK jung


# 1.16 23-Feb-2020 jung

rmeove more unused functions and code

ok florian


# 1.15 23-Feb-2020 florian

We are not passing options to the message renderer.
OK millert


# 1.14 21-Feb-2020 jung

set function parameter list to void

ok millert florian


# 1.13 21-Feb-2020 florian

Read CLOCK_MONOTONIC when we need timestamps to compare and use
time(3) for the wall clock.
prodding & OK jung


# 1.12 20-Feb-2020 florian

Remove support for reading tsig keys from dnssec key pair.
This was accidentally broken some time ago.
Arguably this was the least useful way of providing tsig keys to
dig. ISC also removed generating tsig keys from dnssec-keygen in 9.13.
To read the key from disk using the -k option it has to be provided as
as a session key:
key "keyname" {
algorithm hmac-sha256;
secret "[...]";
};
OK millert


# 1.11 19-Feb-2020 jung

simplify signal setup and remove block/unblock/is_running/reload

with input from florian

ok millert florian


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.29 14-Sep-2020 florian

Mechanically replace isc_boolean_t with int.
OK deraadt


# 1.28 14-Sep-2020 florian

Bunch of dead stores and otherwise unused stuff lets us get rid of
unix/net.{c.h}. We need to sprinkle in a few #includes that net.h
dragged in.
OK deraadt


# 1.27 14-Sep-2020 florian

Rewrite isc_time_microdiff() as uelapsed() and put it directly
into dig sources, lets us get rid of unix/time.{c,h}
OK deraadt


# 1.26 13-Sep-2020 florian

Get rid of isc_parse_uint32() and replace it with strtonum.
While here use the standard strtonum error messages.

input & OK beck, OK kn


Revision tags: OPENBSD_6_7_BASE
# 1.25 25-Feb-2020 florian

use timingsafe_bcmp and get rid of now unused safe.c


# 1.24 25-Feb-2020 deraadt

traditional nslookup would not fatal if the server name was undiscoverable.
change lower level code to return an error, and bump the fatal for host(1)
upwards, then tweak nslookup to work nicely


# 1.23 25-Feb-2020 jsg

reduce multiple newlines


# 1.22 24-Feb-2020 florian

Stop generating rdatastruct.h and put the dns_rdata_* structs for
cname, ns, soa, and tsig directly into rdata.h


# 1.21 24-Feb-2020 florian

We only need to create cname, ns, soa and tsig structs.
OK jsg


# 1.20 24-Feb-2020 florian

We only need to fill a wire format buffer from soa and tsig structs.
OK jsg


# 1.19 24-Feb-2020 florian

We only need to free cname, ns, soa and tsig structs.
OK jsg


# 1.18 24-Feb-2020 jsg

remove some uneeded includes


# 1.17 24-Feb-2020 florian

We are always preserving the order of records.
This lets us remove compare_* and casecompare_* functions from
RR types.
OK jung


# 1.16 23-Feb-2020 jung

rmeove more unused functions and code

ok florian


# 1.15 23-Feb-2020 florian

We are not passing options to the message renderer.
OK millert


# 1.14 21-Feb-2020 jung

set function parameter list to void

ok millert florian


# 1.13 21-Feb-2020 florian

Read CLOCK_MONOTONIC when we need timestamps to compare and use
time(3) for the wall clock.
prodding & OK jung


# 1.12 20-Feb-2020 florian

Remove support for reading tsig keys from dnssec key pair.
This was accidentally broken some time ago.
Arguably this was the least useful way of providing tsig keys to
dig. ISC also removed generating tsig keys from dnssec-keygen in 9.13.
To read the key from disk using the -k option it has to be provided as
as a session key:
key "keyname" {
algorithm hmac-sha256;
secret "[...]";
};
OK millert


# 1.11 19-Feb-2020 jung

simplify signal setup and remove block/unblock/is_running/reload

with input from florian

ok millert florian


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.26 13-Sep-2020 florian

Get rid of isc_parse_uint32() and replace it with strtonum.
While here use the standard strtonum error messages.

input & OK beck, OK kn


Revision tags: OPENBSD_6_7_BASE
# 1.25 25-Feb-2020 florian

use timingsafe_bcmp and get rid of now unused safe.c


# 1.24 25-Feb-2020 deraadt

traditional nslookup would not fatal if the server name was undiscoverable.
change lower level code to return an error, and bump the fatal for host(1)
upwards, then tweak nslookup to work nicely


# 1.23 25-Feb-2020 jsg

reduce multiple newlines


# 1.22 24-Feb-2020 florian

Stop generating rdatastruct.h and put the dns_rdata_* structs for
cname, ns, soa, and tsig directly into rdata.h


# 1.21 24-Feb-2020 florian

We only need to create cname, ns, soa and tsig structs.
OK jsg


# 1.20 24-Feb-2020 florian

We only need to fill a wire format buffer from soa and tsig structs.
OK jsg


# 1.19 24-Feb-2020 florian

We only need to free cname, ns, soa and tsig structs.
OK jsg


# 1.18 24-Feb-2020 jsg

remove some uneeded includes


# 1.17 24-Feb-2020 florian

We are always preserving the order of records.
This lets us remove compare_* and casecompare_* functions from
RR types.
OK jung


# 1.16 23-Feb-2020 jung

rmeove more unused functions and code

ok florian


# 1.15 23-Feb-2020 florian

We are not passing options to the message renderer.
OK millert


# 1.14 21-Feb-2020 jung

set function parameter list to void

ok millert florian


# 1.13 21-Feb-2020 florian

Read CLOCK_MONOTONIC when we need timestamps to compare and use
time(3) for the wall clock.
prodding & OK jung


# 1.12 20-Feb-2020 florian

Remove support for reading tsig keys from dnssec key pair.
This was accidentally broken some time ago.
Arguably this was the least useful way of providing tsig keys to
dig. ISC also removed generating tsig keys from dnssec-keygen in 9.13.
To read the key from disk using the -k option it has to be provided as
as a session key:
key "keyname" {
algorithm hmac-sha256;
secret "[...]";
};
OK millert


# 1.11 19-Feb-2020 jung

simplify signal setup and remove block/unblock/is_running/reload

with input from florian

ok millert florian


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.25 25-Feb-2020 florian

use timingsafe_bcmp and get rid of now unused safe.c


# 1.24 25-Feb-2020 deraadt

traditional nslookup would not fatal if the server name was undiscoverable.
change lower level code to return an error, and bump the fatal for host(1)
upwards, then tweak nslookup to work nicely


# 1.23 25-Feb-2020 jsg

reduce multiple newlines


# 1.22 24-Feb-2020 florian

Stop generating rdatastruct.h and put the dns_rdata_* structs for
cname, ns, soa, and tsig directly into rdata.h


# 1.21 24-Feb-2020 florian

We only need to create cname, ns, soa and tsig structs.
OK jsg


# 1.20 24-Feb-2020 florian

We only need to fill a wire format buffer from soa and tsig structs.
OK jsg


# 1.19 24-Feb-2020 florian

We only need to free cname, ns, soa and tsig structs.
OK jsg


# 1.18 24-Feb-2020 jsg

remove some uneeded includes


# 1.17 24-Feb-2020 florian

We are always preserving the order of records.
This lets us remove compare_* and casecompare_* functions from
RR types.
OK jung


# 1.16 23-Feb-2020 jung

rmeove more unused functions and code

ok florian


# 1.15 23-Feb-2020 florian

We are not passing options to the message renderer.
OK millert


# 1.14 21-Feb-2020 jung

set function parameter list to void

ok millert florian


# 1.13 21-Feb-2020 florian

Read CLOCK_MONOTONIC when we need timestamps to compare and use
time(3) for the wall clock.
prodding & OK jung


# 1.12 20-Feb-2020 florian

Remove support for reading tsig keys from dnssec key pair.
This was accidentally broken some time ago.
Arguably this was the least useful way of providing tsig keys to
dig. ISC also removed generating tsig keys from dnssec-keygen in 9.13.
To read the key from disk using the -k option it has to be provided as
as a session key:
key "keyname" {
algorithm hmac-sha256;
secret "[...]";
};
OK millert


# 1.11 19-Feb-2020 jung

simplify signal setup and remove block/unblock/is_running/reload

with input from florian

ok millert florian


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.23 25-Feb-2020 jsg

reduce multiple newlines


# 1.22 24-Feb-2020 florian

Stop generating rdatastruct.h and put the dns_rdata_* structs for
cname, ns, soa, and tsig directly into rdata.h


# 1.21 24-Feb-2020 florian

We only need to create cname, ns, soa and tsig structs.
OK jsg


# 1.20 24-Feb-2020 florian

We only need to fill a wire format buffer from soa and tsig structs.
OK jsg


# 1.19 24-Feb-2020 florian

We only need to free cname, ns, soa and tsig structs.
OK jsg


# 1.18 24-Feb-2020 jsg

remove some uneeded includes


# 1.17 24-Feb-2020 florian

We are always preserving the order of records.
This lets us remove compare_* and casecompare_* functions from
RR types.
OK jung


# 1.16 23-Feb-2020 jung

rmeove more unused functions and code

ok florian


# 1.15 23-Feb-2020 florian

We are not passing options to the message renderer.
OK millert


# 1.14 21-Feb-2020 jung

set function parameter list to void

ok millert florian


# 1.13 21-Feb-2020 florian

Read CLOCK_MONOTONIC when we need timestamps to compare and use
time(3) for the wall clock.
prodding & OK jung


# 1.12 20-Feb-2020 florian

Remove support for reading tsig keys from dnssec key pair.
This was accidentally broken some time ago.
Arguably this was the least useful way of providing tsig keys to
dig. ISC also removed generating tsig keys from dnssec-keygen in 9.13.
To read the key from disk using the -k option it has to be provided as
as a session key:
key "keyname" {
algorithm hmac-sha256;
secret "[...]";
};
OK millert


# 1.11 19-Feb-2020 jung

simplify signal setup and remove block/unblock/is_running/reload

with input from florian

ok millert florian


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.16 23-Feb-2020 jung

rmeove more unused functions and code

ok florian


# 1.15 23-Feb-2020 florian

We are not passing options to the message renderer.
OK millert


# 1.14 21-Feb-2020 jung

set function parameter list to void

ok millert florian


# 1.13 21-Feb-2020 florian

Read CLOCK_MONOTONIC when we need timestamps to compare and use
time(3) for the wall clock.
prodding & OK jung


# 1.12 20-Feb-2020 florian

Remove support for reading tsig keys from dnssec key pair.
This was accidentally broken some time ago.
Arguably this was the least useful way of providing tsig keys to
dig. ISC also removed generating tsig keys from dnssec-keygen in 9.13.
To read the key from disk using the -k option it has to be provided as
as a session key:
key "keyname" {
algorithm hmac-sha256;
secret "[...]";
};
OK millert


# 1.11 19-Feb-2020 jung

simplify signal setup and remove block/unblock/is_running/reload

with input from florian

ok millert florian


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.15 23-Feb-2020 florian

We are not passing options to the message renderer.
OK millert


# 1.14 21-Feb-2020 jung

set function parameter list to void

ok millert florian


# 1.13 21-Feb-2020 florian

Read CLOCK_MONOTONIC when we need timestamps to compare and use
time(3) for the wall clock.
prodding & OK jung


# 1.12 20-Feb-2020 florian

Remove support for reading tsig keys from dnssec key pair.
This was accidentally broken some time ago.
Arguably this was the least useful way of providing tsig keys to
dig. ISC also removed generating tsig keys from dnssec-keygen in 9.13.
To read the key from disk using the -k option it has to be provided as
as a session key:
key "keyname" {
algorithm hmac-sha256;
secret "[...]";
};
OK millert


# 1.11 19-Feb-2020 jung

simplify signal setup and remove block/unblock/is_running/reload

with input from florian

ok millert florian


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.14 21-Feb-2020 jung

set function parameter list to void

ok millert florian


# 1.13 21-Feb-2020 florian

Read CLOCK_MONOTONIC when we need timestamps to compare and use
time(3) for the wall clock.
prodding & OK jung


# 1.12 20-Feb-2020 florian

Remove support for reading tsig keys from dnssec key pair.
This was accidentally broken some time ago.
Arguably this was the least useful way of providing tsig keys to
dig. ISC also removed generating tsig keys from dnssec-keygen in 9.13.
To read the key from disk using the -k option it has to be provided as
as a session key:
key "keyname" {
algorithm hmac-sha256;
secret "[...]";
};
OK millert


# 1.11 19-Feb-2020 jung

simplify signal setup and remove block/unblock/is_running/reload

with input from florian

ok millert florian


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.12 20-Feb-2020 florian

Remove support for reading tsig keys from dnssec key pair.
This was accidentally broken some time ago.
Arguably this was the least useful way of providing tsig keys to
dig. ISC also removed generating tsig keys from dnssec-keygen in 9.13.
To read the key from disk using the -k option it has to be provided as
as a session key:
key "keyname" {
algorithm hmac-sha256;
secret "[...]";
};
OK millert


# 1.11 19-Feb-2020 jung

simplify signal setup and remove block/unblock/is_running/reload

with input from florian

ok millert florian


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.11 19-Feb-2020 jung

simplify signal setup and remove block/unblock/is_running/reload

with input from florian

ok millert florian


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.10 16-Feb-2020 florian

clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert


# 1.9 16-Feb-2020 florian

Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert


# 1.8 16-Feb-2020 florian

Replace isc_time_t and interval_t with struct timespec.
Input & OK millert


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.7 16-Feb-2020 florian

Now we are only using one timer type (once) and expires is always NULL
so remove those struct members.
OK millert


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.6 15-Feb-2020 florian

get path to resolv.conf from resolv.h


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.5 13-Feb-2020 florian

+trace has the RD bit cleared however it asks the nameserver from
/etc/resolv.conf for a list of root name servers.
Arguably corectly configured recursive nameservers should REFUSE to
answer this question to prevent cache snooping.
Upstream fixed this after the license change by sending the first
query with RD set.
We go a different route, built in a list of root name servers and ask
them. Otherwise known as a priming query. This way +trace does not depend
on any localy configured nameserver in /etc/resolv.conf

"I have no other quibbles" deraadt@
input & OK sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.4 11-Feb-2020 jsg

remove uneeded #include lines

ok florian@


# 1.3 11-Feb-2020 florian

Replace SIZE defines with sizeof.
While here replace memmove with memcpy, the arguments do not overlap.
OK millert, deraadt


# 1.2 11-Feb-2020 florian

Remove #if 0 that has been there since the initial import in 2003.


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen


# 1.1 07-Feb-2020 florian

Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig.

From the beginning when we started to remove unneeded nameserver code,
it was our goal to extract dig functionality from the bind sources,
for everyone's benefit as this is easier to reason about.

In total we removed about 2/3 or over 300.000 lines of code.

We kept the lib/ subdirectory layout but moved the content of bin/ to
the top from the old bind source directory.

Previous sources and history can be found in the src/usr.sbin/bind
Attic.

With & OK deraadt
Proposed directory layout sounds good to sthen