Skip to content

Packet Api Rewrite

Ghost User requested to merge packet-api-rewrite into master

So, here it is #8 (closed) and more in the wiki page. It's a lot of code, but feel free to ask anything.

Here's the general overview of the state of things:

  • Packet API
    • Streamlined, compression reworked, checks in one place, ...
  • Query processing
    • Basically everything from the old name-server.c was remade so it stacks
    1. name-server.h and the ns_proc_* API, which is an API for a state machine that just accepts wireformat and does all the conversions between parsed packets and backwards.
    2. ns_proc_query.h is the implementation of query processing and implements the ns_proc_* API
    • It serves as a generic query -> response machine using solvers.
    • It also covers transaction security and stuff, so the solvers don't need to worry about this.
    1. internet.h, chaos.h, axfr.h, ixfr.h, update.h, notify.h
    • Solver implementations for various queries
      • IN answers / DNSSEC proofs are now RFC compliant in several cases
      • Transfers now also show message and byte counts
    • Since all the bitpushing is done by the upper layers, they just do answer solving
  • UDP & TCP handlers
    • Simplified, using memory context for query processing
    • TCP threads are now coherent, no through-the-pipe "fair" queueing
  • XFR handler is simplified as well (all threads coherent)
  • Basic unit tests for packet, query processing and stuff
  • I don't know what else, just ask. 🎱

Pitfalls 🎌

  • UPDATE forwarding is disabled until #189 (closed) is finished, as to not create more duplicated code and this is already complex enough.

Review

0.0% src/knot/ 0.0% src/knot/conf/ 0.0% src/knot/stat/ 0.0% src/libknot/dnssec/ 0.0% tests-extra/data/ 0.0% tests-extra/tests/basic/nsec/ 0.0% tests-extra/tests/basic/nsec3/ 0.0% tests-extra/tests/security/protos/ 0.1% src/ 0.4% src/utils/nsupdate/ 0.7% src/common/ 1.2% src/utils/dig/ 1.4% src/utils/common/ 1.5% src/libknot/ 1.8% src/knot/ctl/ 2.3% src/libknot/zone/ 3.1% src/libknot/updates/ 3.5% tests/ 4.2% src/libknot/util/ 15.5% src/knot/server/ 25.4% src/libknot/packet/ 37.8% src/libknot/nameserver/ (with the exception of nsec3_proofs)

Merge request reports