diff options
author | 2016-03-05 14:40:34 +0000 | |
---|---|---|
committer | 2016-03-05 14:40:34 +0000 | |
commit | 32e31f52e36af99d6c892da1c06b3a3a95663187 (patch) | |
tree | 54c370a5c2d59f0f4148c97cf42c1b6e0dbc5cd3 /usr.sbin/unbound/validator/val_utils.c | |
parent | safer pattern: if you're interested in one child, get THAT one, don't steal (diff) | |
download | wireguard-openbsd-32e31f52e36af99d6c892da1c06b3a3a95663187.tar.xz wireguard-openbsd-32e31f52e36af99d6c892da1c06b3a3a95663187.zip |
update to unbound 1.5.8, ok florian@ jung@
Diffstat (limited to 'usr.sbin/unbound/validator/val_utils.c')
-rw-r--r-- | usr.sbin/unbound/validator/val_utils.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/usr.sbin/unbound/validator/val_utils.c b/usr.sbin/unbound/validator/val_utils.c index 475b0c9054e..94f00a7f7ee 100644 --- a/usr.sbin/unbound/validator/val_utils.c +++ b/usr.sbin/unbound/validator/val_utils.c @@ -54,6 +54,8 @@ #include "util/net_help.h" #include "util/module.h" #include "util/regional.h" +#include "sldns/wire2str.h" +#include "sldns/parseutil.h" enum val_classification val_classify_response(uint16_t query_flags, struct query_info* origqinf, @@ -691,6 +693,31 @@ val_dsset_isusable(struct ub_packed_rrset_key* ds_rrset) ds_key_algo_is_supported(ds_rrset, i)) return 1; } + if(verbosity < VERB_ALGO) + return 0; + if(rrset_get_count(ds_rrset) == 0) + verbose(VERB_ALGO, "DS is not usable"); + else { + /* report usability for the first DS RR */ + sldns_lookup_table *lt; + char herr[64], aerr[64]; + lt = sldns_lookup_by_id(sldns_hashes, + (int)ds_get_digest_algo(ds_rrset, i)); + if(lt) snprintf(herr, sizeof(herr), "%s", lt->name); + else snprintf(herr, sizeof(herr), "%d", + (int)ds_get_digest_algo(ds_rrset, i)); + lt = sldns_lookup_by_id(sldns_algorithms, + (int)ds_get_key_algo(ds_rrset, i)); + if(lt) snprintf(aerr, sizeof(aerr), "%s", lt->name); + else snprintf(aerr, sizeof(aerr), "%d", + (int)ds_get_key_algo(ds_rrset, i)); + verbose(VERB_ALGO, "DS unsupported, hash %s %s, " + "key algorithm %s %s", herr, + (ds_digest_algo_is_supported(ds_rrset, 0)? + "(supported)":"(unsupported)"), aerr, + (ds_key_algo_is_supported(ds_rrset, 0)? + "(supported)":"(unsupported)")); + } return 0; } |