mirror of
https://github.com/monero-project/monero.git
synced 2025-08-01 00:08:42 -04:00
Upgrade unbound library
These files were pulled from the 1.6.3 release tarball. This new version builds against OpenSSL version 1.1 which will be the default in the new Debian Stable which is due to be released RealSoonNow (tm).
This commit is contained in:
parent
e3da0ca828
commit
a85b5759f3
241 changed files with 33336 additions and 12049 deletions
26
external/unbound/util/data/dname.c
vendored
26
external/unbound/util/data/dname.c
vendored
|
@ -256,11 +256,13 @@ dname_pkt_compare(sldns_buffer* pkt, uint8_t* d1, uint8_t* d2)
|
|||
log_assert(len1 == len2 && len1 != 0);
|
||||
/* compare labels */
|
||||
while(len1--) {
|
||||
if(tolower((unsigned char)*d1++) != tolower((unsigned char)*d2++)) {
|
||||
if(tolower((unsigned char)d1[-1]) < tolower((unsigned char)d2[-1]))
|
||||
if(tolower((unsigned char)*d1) != tolower((unsigned char)*d2)) {
|
||||
if(tolower((unsigned char)*d1) < tolower((unsigned char)*d2))
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
d1++;
|
||||
d2++;
|
||||
}
|
||||
len1 = *d1++;
|
||||
len2 = *d2++;
|
||||
|
@ -268,8 +270,8 @@ dname_pkt_compare(sldns_buffer* pkt, uint8_t* d1, uint8_t* d2)
|
|||
return 0;
|
||||
}
|
||||
|
||||
hashvalue_t
|
||||
dname_query_hash(uint8_t* dname, hashvalue_t h)
|
||||
hashvalue_type
|
||||
dname_query_hash(uint8_t* dname, hashvalue_type h)
|
||||
{
|
||||
uint8_t labuf[LDNS_MAX_LABELLEN+1];
|
||||
uint8_t lablen;
|
||||
|
@ -281,8 +283,10 @@ dname_query_hash(uint8_t* dname, hashvalue_t h)
|
|||
log_assert(lablen <= LDNS_MAX_LABELLEN);
|
||||
labuf[0] = lablen;
|
||||
i=0;
|
||||
while(lablen--)
|
||||
labuf[++i] = (uint8_t)tolower((unsigned char)*dname++);
|
||||
while(lablen--) {
|
||||
labuf[++i] = (uint8_t)tolower((unsigned char)*dname);
|
||||
dname++;
|
||||
}
|
||||
h = hashlittle(labuf, labuf[0] + 1, h);
|
||||
lablen = *dname++;
|
||||
}
|
||||
|
@ -290,8 +294,8 @@ dname_query_hash(uint8_t* dname, hashvalue_t h)
|
|||
return h;
|
||||
}
|
||||
|
||||
hashvalue_t
|
||||
dname_pkt_hash(sldns_buffer* pkt, uint8_t* dname, hashvalue_t h)
|
||||
hashvalue_type
|
||||
dname_pkt_hash(sldns_buffer* pkt, uint8_t* dname, hashvalue_type h)
|
||||
{
|
||||
uint8_t labuf[LDNS_MAX_LABELLEN+1];
|
||||
uint8_t lablen;
|
||||
|
@ -309,8 +313,10 @@ dname_pkt_hash(sldns_buffer* pkt, uint8_t* dname, hashvalue_t h)
|
|||
log_assert(lablen <= LDNS_MAX_LABELLEN);
|
||||
labuf[0] = lablen;
|
||||
i=0;
|
||||
while(lablen--)
|
||||
labuf[++i] = (uint8_t)tolower((unsigned char)*dname++);
|
||||
while(lablen--) {
|
||||
labuf[++i] = (uint8_t)tolower((unsigned char)*dname);
|
||||
dname++;
|
||||
}
|
||||
h = hashlittle(labuf, labuf[0] + 1, h);
|
||||
lablen = *dname++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue