Skip to content
Snippets Groups Projects
  1. Dec 08, 2017
    • Vitezslav Kriz's avatar
      use monotonic time · 0abbe1f4
      Vitezslav Kriz authored and Petr Špaček's avatar Petr Špaček committed
      Monotonic time from libuv function uv_now (wrapped in kr_now) is
      used for query timeout, stats and RTT in reputation cache.
      
      Cache, DNSSEC Validation and Cookies use real time.
      Verified
      0abbe1f4
    • Petr Špaček's avatar
      daemon: add missing RR type definitions · 2512a32a
      Petr Špaček authored
      Some RR type definitions present in IANA DNS parameters registry were
      missing in kresd. This commit synchronizes the tables with IANA registry
      as of 2017-12-08 13:20 UTC.
      
      At the same time, this commit is
      fixup! converted constant tables, support kres.type.TYPE1234
      The mentioned commit accidentally removed NULL definition which broke TA
      signaling module.
      Verified
      2512a32a
  2. Dec 07, 2017
  3. Dec 05, 2017
  4. Dec 04, 2017
  5. Dec 01, 2017
  6. Nov 28, 2017
  7. Nov 24, 2017
    • Marek Vavruša's avatar
      daemon/lua: fixed unused variables, whitespace, cleanup · 3162da83
      Marek Vavruša authored
      Also fixed improper promotion of `ffi` to global variable.
      
      ```
      $ luacheck --codes daemon/lua/
      Checking daemon/lua/config.lua                    OK
      Checking daemon/lua/kres-gen.lua                  OK
      Checking daemon/lua/kres.lua                      OK
      Checking daemon/lua/sandbox.lua                   OK
      Checking daemon/lua/trust_anchors.lua             OK
      Checking daemon/lua/zonefile.lua                  OK
      
      Total: 0 warnings / 0 errors in 6 files
      ```
      3162da83
    • Marek Vavruša's avatar
      added basic config test for consts, depend on knot >= 2.4, cleanup · b90e6c71
      Marek Vavruša authored
      The library now depends on libknot >= 2.4.0 (in Debian stable),
      this allows us to remove a dead code and sed-ing of the kres.lua
      
      Added a basic config tests to check that constants still work,
      and basic interface to rrsets still works after the change.
      b90e6c71
    • Marek Vavruša's avatar
      95a6fdf7
    • Marek Vavruša's avatar
      converted constant tables, support kres.type.TYPE1234 · 0ec11416
      Marek Vavruša authored
      The difficulty with using structs as constant tables is that access
      to non-existent fields throws an error. This is difficult to handle
      without wrapping every access in a pcall, for example in predict module:
      
      ```
      error: /usr/local/lib/kdns_modules/predict.lua:34: 'struct rr_type' has no member named 'TYPE65535'
      ```
      
      So I converted the constant tables into regular Lua tables,
      and added a metatable for RR types to allow looking up unnamed types,
      in the TYPE%d format. Looking up non-existent fields will now
      return nil instead of throwing an error.
      0ec11416
    • Marek Vavruša's avatar
      tests: fixed config tests locking up on error, added test for predict · 52d4f519
      Marek Vavruša authored
      The config tests locked up on error as if error was raised from the
      event callback, it would never reach the `quit()` statement, so
      server would never close on error.
      
      Added a script to make running these types of tests a little bit nicer
      and to allow concurrent execution of config tests.
      
      Added a test for the predict module, that fails on prediction
      of unknown types:
      
      ```
      error: /usr/local/lib/kdns_modules/predict.lua:34: 'struct rr_type' has no member named 'TYPE65535'
      ```
      52d4f519
  8. Nov 20, 2017
  9. Nov 16, 2017
  10. Nov 13, 2017
  11. Nov 02, 2017
  12. Nov 01, 2017
  13. Oct 13, 2017
  14. Sep 29, 2017
  15. Sep 21, 2017
  16. Sep 12, 2017
    • Vladimír Čunát's avatar
      gnutls logging improvements · 3467ee81
      Vladimír Čunát authored
      - move it to utils.c, so it's sensitive to later changes in verbosity
      - don't mark the lines with [tls], as they may come through libdnssec
      - use stdout like other verbose messages, instead of stderr (real errors)
      3467ee81
  17. Sep 11, 2017
  18. Sep 07, 2017
  19. Sep 01, 2017
    • Vladimír Čunát's avatar
      cache: rework reusing transactions (LMDB) · e2621d92
      Vladimír Čunát authored
      Previously a read transaction could be held open by each fork
      indefinitely.  That was done for better speed, but it had a downside
      of keeping old pages alive and potentially reading only old data,
      until some writes were attempted by that fork.
      
      Now kr_cache_ provides explicit API for suitable points where to break
      transactions, reusing the _sync command.  On LMDB side the read-only
      transaction is only reset and later renewed, supposedly giving better
      performance than aborting (see LMDB docs on reset+renew).
      
      Performance: preliminary testing with two forks, resperf on comcast
      query-set shows no noticeable difference in peak QPS.
      e2621d92
  20. Aug 29, 2017
  21. Aug 24, 2017
  22. Aug 22, 2017
  23. Aug 18, 2017
  24. Aug 09, 2017
  25. Aug 03, 2017
    • Vladimír Čunát's avatar
      kr_rand_uint: nitpicks · c2dbf720
      Vladimír Čunát authored
      - the returned value is up to max-1 and not max (tiny bias)
      - improve efficiency slightly
      - unsigned -> uint32_t, as that's the range it supports (mostly equal)
      c2dbf720
  26. Aug 01, 2017