2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 13:08:06 +00:00

5 Commits

Author SHA1 Message Date
Evan Hunt
916ea26ead remove nonfunctional DSCP implementation
DSCP has not been fully working since the network manager was
introduced in 9.16, and has been completely broken since 9.18.
This seems to have caused very few difficulties for anyone,
so we have now marked it as obsolete and removed the
implementation.

To ensure that old config files don't fail, the code to parse
dscp key-value pairs is still present, but a warning is logged
that the feature is obsolete and should not be used. Nothing is
done with configured values, and there is no longer any
range checking.
2023-01-09 12:15:21 -08:00
Matthijs Mekking
abd8c1cad0 Fix CID 432259: Sizeof not portable (remote.c)
The following report suggests that the 'size' parameter in the two
calls to 'isc_mem_get()' should be set to the
'count * sizeof(*tlsnames)' and 'count * sizeof(*keynames)'
respectively.

/lib/dns/remote.c: 117 in dns_remote_init()
111		}
112	} else {
113		remote->keynames = NULL;
114	}
115
116	if (tlsnames != NULL) {

>>>     CID 432259:    (SIZEOF_MISMATCH)
>>>     Passing argument "count * 8UL /* sizeof (tlsnames) */" to
>>>	function "isc__mem_get" and then casting the return value to
>>>	"dns_name_t **" is suspicious.  In this particular case
>>>	"sizeof (dns_name_t **)" happens to be equal to
>>>	"sizeof (dns_name_t *)", but this is not a portable assumption.

117	remote->tlsnames = isc_mem_get(mctx, count * sizeof(tlsnames));
118		for (i = 0; i < count; i++) {
119			remote->tlsnames[i] = NULL;
120		}
121		for (i = 0; i < count; i++) {
122			if (tlsnames[i] != NULL) {

/lib/dns/remote.c: 99 in dns_remote_init()
93		memmove(remote->dscps, dscp, count * sizeof(isc_dscp_t));
94	} else {
95		remote->dscps = NULL;
96	}
97
98	if (keynames != NULL) {

>>>     CID 432259:    (SIZEOF_MISMATCH)
>>>     Passing argument "count * 8UL /* sizeof (keynames) */" to
>>>	function "isc__mem_get" and then casting the return value to
>>>	"dns_name_t **" is suspicious.  In this particular case
>>>	"sizeof (dns_name_t **)" happens to be equal to "sizeof
>>>	(dns_name_t *)", but this is not a portable assumption.

99	 remote->keynames = isc_mem_get(mctx, count * sizeof(keynames));
100	 for (i = 0; i < count; i++) {
101		remote->keynames[i] = NULL;
102	 }
103	 for (i = 0; i < count; i++) {
104		if (keynames[i] != NULL) {
2023-01-03 16:47:57 +01:00
Matthijs Mekking
d8e98d4bba Remove unused dns_remote_t functions
Now that setting alternate transfer sources is removed, the functions
to check whether all addresses are considered good have become obsolete.
2022-12-23 15:17:54 +01:00
Matthijs Mekking
17e16c7a34 Parse and store new 'source[-v6]' option
Parse the new 'source' and 'source-v6' options and store them with
the corresponding remote servers (parental-agents, primaries, ...).
2022-12-23 13:36:50 +00:00
Matthijs Mekking
0300295944 Add new files for remote server communication
The dns_remote_t structure is intended to replace the variables in
the structure that deals with remote server communication to primaries,
parental agents, forwarders, etc.
2022-12-23 13:36:50 +00:00