Maintained by: NLnet Labs

[Unbound-users] libunbound validation

Ondřej Surý
Fri Aug 6 15:44:44 CEST 2010

Hi Wouter,

I have a very simple code:

#include <string.h>
#include <stdio.h>
#include <unbound.h>
#include <ldns.h>

int main(int argc, char **argv) {

  struct ub_ctx *ctx;
  struct ub_result *r;

  ldns_pkt *pkt;

  ldns_rdf rdf;

  int x = 0;

  ctx = ub_ctx_create();
  ub_ctx_add_ta(ctx, ". IN DS 19036 8 2
  ub_ctx_hosts(ctx, NULL);
  ub_ctx_resolvconf(ctx, NULL);

  ub_resolve(ctx, "", LDNS_RR_TYPE_AAAA, LDNS_RR_CLASS_IN, &r);

  ldns_wire2pkt(&pkt, r->answer_packet, r->answer_len);

  printf("%s\n", ldns_pkt2str(pkt));


  return 0;

And it resolvers (which it shouldn't) without any problems.

What I am doing wrong?

Ondřej Surý <ondrej at>