Verified Commit edb8ffef authored by Vladimír Čunát's avatar Vladimír Čunát Committed by Tomas Krizek
Browse files

iterate: better efficiency on huge RRsets

- written relatively defensively - act OK even if the API
  isn't used in an ideal way
- CI lint:scan-build: bump the error count;
  It's only another instance of the mis-detected array_push().
- the removed stale note in modules/meson.build isn't really related
parent b6baac2b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ lint:scan-build:
  script:
    - export SCANBUILD="scan-build --status-bugs -no-failure-reports $(./scripts/get-scanbuild-args.sh)"
    - ninja -C build_ci* scan-build || true
    - test "$(ls build_ci*/meson-logs/scanbuild/*/report-*.html | wc -l)" = 29 # we have this many errors ATM :-)
    - test "$(ls build_ci*/meson-logs/scanbuild/*/report-*.html | wc -l)" = 31 # we have this many errors ATM :-)

lint:tidy:
  <<: *test
+4 −0
Original line number Diff line number Diff line
Knot Resolver ??
================================

Security
--------
- improve performance with huge RRsets (DoS, #518)

Bugfixes
--------
- http module: use SO_REUSEPORT (!879)
+2 −0
Original line number Diff line number Diff line
@@ -126,6 +126,7 @@ struct ranked_rr_array_entry {
	_Bool yielded : 1;
	_Bool to_wire : 1;
	_Bool expiring : 1;
	_Bool in_progress : 1;
	knot_rrset_t *rr;
};
typedef struct ranked_rr_array_entry ranked_rr_array_entry_t;
@@ -352,6 +353,7 @@ int kr_family_len(int);
struct sockaddr *kr_straddr_socket(const char *, int, knot_mm_t *);
int kr_straddr_split(const char *, char * restrict, uint16_t *);
int kr_ranked_rrarray_add(ranked_rr_array_t *, const knot_rrset_t *, uint8_t, _Bool, uint32_t, knot_mm_t *);
int kr_ranked_rrarray_finalize(ranked_rr_array_t *, uint32_t, knot_mm_t *);
void kr_qflags_set(struct kr_qflags *, struct kr_qflags);
void kr_qflags_clear(struct kr_qflags *, struct kr_qflags);
int kr_zonecut_add(struct kr_zonecut *, const knot_dname_t *, const void *, int);
+1 −0
Original line number Diff line number Diff line
@@ -216,6 +216,7 @@ ${CDEFS} ${LIBKRES} functions <<-EOF
	kr_straddr_socket
	kr_straddr_split
	kr_ranked_rrarray_add
	kr_ranked_rrarray_finalize
	kr_qflags_set
	kr_qflags_clear
	kr_zonecut_add
+10 −0
Original line number Diff line number Diff line
@@ -5,6 +5,16 @@ Upgrading
This section summarizes steps required for upgrade to newer Knot Resolver versions.
We advise users to also read :ref:`release_notes` for respective versions.

4.2.2 to 4.3+
=============

Module changes
--------------

* In case you directly call ``kr_ranked_rrarray_add()`` from your own module,
  you need to additionally call ``kr_ranked_rrarray_finalize()`` after each batch
  (before changing the added memory regions).

.. _upgrade-from-3-to-4:

4.x to 4.2.1+
Loading