Unbound 1.9.6rc1 pre-release
Paul Wouters
paul at nohats.ca
Thu Dec 5 23:51:17 UTC 2019
On Thu, 5 Dec 2019, Tuomo Soini via Unbound-users wrote:
>> Unbound 1.9.6rc1 pre-release is available:
>> https://nlnetlabs.nl/downloads/unbound/unbound-1.9.6rc1.tar.gz
>> sha256
>> 7e8a5e8856158d646504a853201bebfb389bb84e627a0a3362ba71f0c909ad79 pgp
>> https://nlnetlabs.nl/downloads/unbound/unbound-1.9.6rc1.tar.gz.asc
>
> Doesn't build here.
>
> On rhel7 based system:
>
> ipsecmod/ipsecmod.c: In function 'call_hook':
> ipsecmod/ipsecmod.c:340:4: error: too few arguments to function
> 'sldns_wire2str_ipseckey_scan' &slen, NULL, 0);
> ^
> In file included from ipsecmod/ipsecmod.c:53:0:
> ./sldns/wire2str.h:814:5: note: declared here
> int sldns_wire2str_ipseckey_scan(uint8_t** data, size_t* data_len,
> char** str, ^
> make: *** [ipsecmod.lo] Error 1
>
> And on rhel6 based system:
> ipsecmod/ipsecmod.c: In function 'call_hook':
> ipsecmod/ipsecmod.c:340: error: too few arguments to function
> 'sldns_wire2str_ipseckey_scan' make: *** [ipsecmod.lo] Error 1
>
> Same error, different diagnostics. Hope this help to fix the issue.
Same build issue on fedora.
Seems sldns_wire2str_ipseckey_scan() was changed from:
int sldns_wire2str_ipseckey_scan(uint8_t** d, size_t* dl, char** s, size_t* sl,
uint8_t* pkt, size_t pktlen)
to:
int sldns_wire2str_ipseckey_scan(uint8_t** d, size_t* dl, char** s, size_t* sl,
uint8_t* pkt, size_t pktlen, int* comprloop)
But the only call to it was not updated for the added argument comprloop.
It looks like the variable is to prevent infinite cname/dname
loops? So perhaps this function accidentally got the additional
parameter when similar functions like ldns_wire2str_rr_scan() were
changed to get loop protection? Since the function
sldns_wire2str_ipseckey_scan() itself doesn't change or use the
parameter, I think the added param was done in mistake.
Suggested patch attached,
Paul
-------------- next part --------------
diff -Naur unbound-1.9.6rc1/sldns/wire2str.c unbound-1.9.6rc1-new/sldns/wire2str.c
--- unbound-1.9.6rc1/sldns/wire2str.c 2019-12-05 10:26:37.000000000 +0000
+++ unbound-1.9.6rc1-new/sldns/wire2str.c 2019-12-05 23:48:51.501860681 +0000
@@ -1000,7 +1000,7 @@
return sldns_wire2str_atma_scan(d, dlen, s, slen);
case LDNS_RDF_TYPE_IPSECKEY:
return sldns_wire2str_ipseckey_scan(d, dlen, s, slen, pkt,
- pktlen, comprloop);
+ pktlen);
case LDNS_RDF_TYPE_HIP:
return sldns_wire2str_hip_scan(d, dlen, s, slen);
case LDNS_RDF_TYPE_INT16_DATA:
@@ -1542,7 +1542,7 @@
/* internal scan routine that can modify arguments on failure */
static int sldns_wire2str_ipseckey_scan_internal(uint8_t** d, size_t* dl,
- char** s, size_t* sl, uint8_t* pkt, size_t pktlen, int* comprloop)
+ char** s, size_t* sl, uint8_t* pkt, size_t pktlen)
{
/* http://www.ietf.org/internet-drafts/draft-ietf-ipseckey-rr-12.txt*/
uint8_t precedence, gateway_type, algorithm;
@@ -1584,12 +1584,12 @@
}
int sldns_wire2str_ipseckey_scan(uint8_t** d, size_t* dl, char** s, size_t* sl,
- uint8_t* pkt, size_t pktlen, int* comprloop)
+ uint8_t* pkt, size_t pktlen)
{
uint8_t* od = *d;
char* os = *s;
size_t odl = *dl, osl = *sl;
- int w=sldns_wire2str_ipseckey_scan_internal(d, dl, s, sl, pkt, pktlen, comprloop);
+ int w=sldns_wire2str_ipseckey_scan_internal(d, dl, s, sl, pkt, pktlen);
if(w == -1) {
*d = od;
*s = os;
diff -Naur unbound-1.9.6rc1/sldns/wire2str.h unbound-1.9.6rc1-new/sldns/wire2str.h
--- unbound-1.9.6rc1/sldns/wire2str.h 2019-12-05 10:26:37.000000000 +0000
+++ unbound-1.9.6rc1-new/sldns/wire2str.h 2019-12-05 23:48:58.130949268 +0000
@@ -812,7 +812,7 @@
* Can return -1 on failure.
*/
int sldns_wire2str_ipseckey_scan(uint8_t** data, size_t* data_len, char** str,
- size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop);
+ size_t* str_len, uint8_t* pkt, size_t pktlen);
/**
* Scan wireformat HIP (algo, HIT, pubkey) field to string, with user buffers.
More information about the Unbound-users
mailing list