- Jul 01, 2024
-
-
Marc van der Wal authored
-
- Jun 27, 2024
-
-
Marc van der Wal authored
-
- Jun 19, 2024
-
-
Marc van der Wal authored
Respond with FORMERR, not SERVFAIL, in case the incoming request has not exactly one question See merge request !43
-
Marc van der Wal authored
Incoming packets with zero or more questions should elicit a FORMERR response instead of causing crashes. Due to an oversight, this case was not appropriately tested. Unit tests to that effect have been added.
-
Marc van der Wal authored
Add examples of incoming packets that have zero or multiple entries in their question sections, and test the decoding of them.
-
Marc van der Wal authored
Miscellaneous refactorings, documentation fixes and style changes See merge request !44
-
Marc van der Wal authored
If the only statement of a function is a “try” block, then Elixir provides syntactic sugar that allows “rescue” and “catch” clauses to be moved outside the “def” or “defp”, so that the happy path stays one indentation level from the “def”/“defp” and “rescue”/“catch” is at the same indentation level as “def”/“defp”. See also: https://hexdocs.pm/elixir/1.11.0/Kernel.html#def/2-rescue-catch-after-else
-
Marc van der Wal authored
Encode messages using IBDNS.DNS.Opcode conversion functions See merge request !42
-
Marc van der Wal authored
Don’t crash if we try to encode a message containing an opcode different from :query.
-
Marc van der Wal authored
-
Marc van der Wal authored
Use the appropriate heredoc sigil to make some examples in documentation less awkward to read, write and edit in source.
-
Marc van der Wal authored
-
Marc van der Wal authored
Document need for mix local.hex and local.rebar See merge request !41
-
Marc van der Wal authored
The installation instructions were not quite complete: building IBDNS requires Hex and Rebar.
-
- Jun 18, 2024
-
-
Marc van der Wal authored
The current CI pipeline used a wrong assumption about Gitlab CI’s caching model. Pipelines should be designed with the assumption that the data to be cached doesn’t always exist. This should help fix spurious CI failures.
-
Marc van der Wal authored
Test multiple versions of Elixir in CI; fix incompatibilities with Elixir v1.11 See merge request !40
-
- Jun 13, 2024
-
-
Marc van der Wal authored
The wire format for LOC resource records requires that some fields be converted into some kind of decimal floating-point representation allowing one decimal digit for the mantissa and one decimal digit for the exponent. The previous algorithm used the ** operator for raising 10 to an integer power. But this operator was only introduced in Elixir 1.13. This meant that IBDNS could not be compiled with older Elixir versions that we want to support. The new algorithm has the same iterative approach, but leverages Stream and Enum in order to generate a list of possible candidates, removing the illegal ones (i.e. whose mantissa is greater than 9) and keeping the first one that works. Too large values are still encoded as having a mantissa of 9 and an exponent of 10^9. Fixes #45.
-
Marc van der Wal authored
There is an issue with Elixir 1.17.0 which causes Dialyxir to erroneously report some code in IBDNS as having no local returns. The workaround is too cumbersome to implement; it is easier to just ignore the warnings for the time being. The issue is triggered when a “with” statement has an “else” clause that may raise an exception. See also: https://github.com/elixir-lang/elixir/issues/13656
-
Marc van der Wal authored
On Elixir 1.11.x, Dialyzer could generate spurious warnings in code generated by yecc. We can’t do much about it. Later versions of Elixir report no problems.
-
Marc van der Wal authored
We need Elixir 1.10 in order to benefit from a feature in Mix’s release-building infrastructure called overlays; these are files that are copied as data files along with the BEAM binaries. We use this for shipping a default configuration file. And we need Elixir 1.11 for two reasons. Firstly, to benefit from more features in guards, such as the is_struct/2 guard, which tests whether a term is a struct of a certain type, and the ability to use the struct.member syntax in guards. Secondly, to be able to use ExUnit.Case.register_test/6, which deprecates the previous register_test/4 function. Those features lack in Elixir 1.9. As of now, I do not know whether it is worth spending the time to try to get IBDNS to work on Elixir 1.9 or 1.10, but for having tried to have a go at fixing IBDNS for Elixir 1.10, it is probably going to be tedious. Besides, Elixir 1.11.0 was released about three years and a half ago, so we are by no means requiring a cutting-edge version of Elixir.
-
Marc van der Wal authored
-
Marc van der Wal authored
The base32 library now seems to require rebar3 for building, but it wasn’t installed appropriately in the CI environment. The remedy is to have it installed before attempting to compile the dependencies.
-
Marc van der Wal authored
I’ve witnessed a case, presumably due to a recent new release of Erlang/OTP, where caching the PLT files caused problems. The speed gain of caching those files is debatable anyway, so let’s just keep things simple and only cache the dependencies, using mix.lock as the cache key.
-
- May 02, 2024
-
-
Marc van der Wal authored
The automatic creation of releases needs a Docker image with the “release-cli” utility installed, which the Elixir image doesn’t have. Otherwise, the pipeline that is executed when a tag is pushed fails.
-
Marc van der Wal authored
Version 0.3.4 First release under GPLv3 license. Adds support for $INCLUDE in zone files. Fixes a resource exhaustion bug when answering queries over TCP and a programming oversight when a server is running with no zones configured to be loaded.
-
Marc van der Wal authored
-
Marc van der Wal authored
-
Marc van der Wal authored
Add support for $INCLUDE directives in zone files See merge request !39
-
- Apr 30, 2024
-
-
Marc van der Wal authored
The same passage also stated that only a small subset of resource record types was supported by the parser. That is no longer true, and most zone files can be read in without a problem.
-
Marc van der Wal authored
-
Marc van der Wal authored
It works, but there is no protection against inclusion loops yet.
-
- Apr 29, 2024
-
-
Marc van der Wal authored
Make data structures describing errors happening at zone loading time more consistent. The idea is to always ensure that error tuples are three-tuples of {:error, where, what}. The parser code is also improved so that errors happening at post-processing time stop that post-processing immediately, instead of waiting until the file is done processing.
-
Marc van der Wal authored
Prepare test zones that contain $INCLUDE directives. The unit tests are only modified so that they read from the files instead of hard-coded strings.
-
Marc van der Wal authored
Clarify that the origin parameter in IBDNS.Zone.FileParser.read/3 must be an domain in absolute labels list form, be it in the documentation and in the spec. To enforce that restriction, also define a useful guard in IBDNS.Name and use it for IBDNS.Zone.FileParser.read/3 so that anything that is not an absolute labels list is rejected.
-
Marc van der Wal authored
Relicense project as GPLv3 See merge request !38
-
Marc van der Wal authored
Add or improve docstrings in various modules, types and functions, to make the source easier to follow for newcomers. Some functions have specs added to them. This improved the coverage and exhaustivity of Dialyzer reports and helped fix one bug. There are some other minor drive-by refactorings in this code, but they shouldn’t change anything functionally.
-
- Apr 25, 2024
-
-
Marc van der Wal authored
Ensure compliance to the REUSE specification by adding another action in the testing stage of the continuous integration setup.
-
Marc van der Wal authored
After stating the license in a form that’s nice for machines, let’s state it in a more human-friendly and prominent way by editing README.md.
-
Marc van der Wal authored
Mark all files in version control with the appropriate licensing information, according to <https://reuse.software>. All files are licensed under GPL-3.0-or-later, with some exceptions. There are two CSV files downloaded from IANA whose copyright information is set appropriately (CC0-1.0). Some trivial files are released under the CC0-1.0 license too.
-
- Apr 23, 2024
-
-
Marc van der Wal authored
Don’t crash if a virtual server has no zones See merge request !37
-