Commit Graph

6 Commits

Author SHA1 Message Date
Florian Lehner 7963800469
l is never used (#1071)
Signed-off-by: Lehner Florian <dev@der-flo.net>
2020-02-03 21:10:40 +01:00
Miek Gieben 93f749db12
Revert "pool the transient maps used for Msg Pack, Truncate and Len (#1006)" (#1017)
This reverts #1006, see discussion on the PR. Def. worth exploring this
furhter and pushing a more correct approach.

This reverts commit 9578caeab0.
2019-10-03 07:36:27 +01:00
Charlie Vieth 9578caeab0 pool the transient maps used for Msg Pack, Truncate and Len (#1006)
This improves runtime by 20-40% and more importantly significantly
reduces memory usage and allocations.
2019-09-23 07:16:26 +01:00
Tom Thorogood 7f2bf8764a Set the TC bit more aggressively in Truncate (#989)
* Set the TC bit more aggressively in Truncate

* Update Truncate documentation for TC bit changes
2019-06-24 16:59:43 +01:00
Miek Gieben 59b8e6b3db
Remove the word Scrub (#961)
The function is called Truncate, not Scrub (that was the old name).
Updated the function's documentation to rename this.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-05-03 08:25:00 +01:00
Tom Thorogood d051b464e9 Add a message truncation implementation (#854)
* Add a message truncation implementation

* Remove OPT if-statement at end of Scrub

* Impose RFC 6891 payload size limit in Scrub

* Remove *Msg receiver from truncateLoop

* Remove OPT record creation from Scrub

* Test that TestRequestScrubAnswerExact has correct record count

* Rename (*Msg).Scrub to Truncate

This better reflects it's purpose.

* Remove comment reference to scrubbing in Truncate

* Properly calculate the length of OPT record in Truncate

* Correct comment in IsEdns0 in regards to RFC 6891

* Handle the OPT record being anywhere in Truncate

* Slight cleanup of Msg.Truncate
2019-03-24 09:20:11 +00:00