chiark / gitweb /
Mark Wooding [Mon, 17 Jun 2024 16:40:59 +0000 (17:40 +0100)]
zone-run: Add simple script for running `zone' without a vast image.
Mark Wooding [Mon, 17 Jun 2024 16:32:56 +0000 (17:32 +0100)]
Makefile, zone.asd: Use ASDF and `runlisp' for building images.
ASDF will make standalone images rather than the weird shell-script-
assisted things that `cl-launch' produces.
This is a little tricky because ASDF output translations can't match
just a filename with no type. As a bodge, produce the image with a
`.img' extension and rename in the makefile.
Mark Wooding [Wed, 8 May 2024 12:51:49 +0000 (13:51 +0100)]
net.lisp (ipmask-cidr-slash): Rename from `ipmask-cidl-slash'.
I can only plead incompetence.
Mark Wooding [Sun, 5 May 2024 01:50:03 +0000 (02:50 +0100)]
zone.lisp: Add seconds-to-timespec conversion and use it when dumping SOA.
Mark Wooding [Sun, 5 May 2024 01:49:12 +0000 (02:49 +0100)]
zone.lisp: Initialize the default timeouts with timespec forms.
Mostly to show that it can be done.
Mark Wooding [Sun, 5 May 2024 01:48:34 +0000 (02:48 +0100)]
zone.lisp (timespec-seconds): Rewrite using a table of units.
Mark Wooding [Sun, 5 May 2024 01:43:30 +0000 (02:43 +0100)]
zone.lisp (split-txt-data): Add documentation.
Mark Wooding [Sat, 4 May 2024 23:55:21 +0000 (00:55 +0100)]
zone.lisp: Add a parser for DMARC policy records.
Mark Wooding [Fri, 3 May 2024 00:24:07 +0000 (01:24 +0100)]
zone.lisp: Add support for building SPF records.
This uses a fancy S-expression syntax rather than the raw text format,
so that it can look things up in the hosts and networks databases.
Mark Wooding [Sat, 4 May 2024 23:54:58 +0000 (00:54 +0100)]
zone.lisp (:dkim): Replace a loop with `format' trickery.
Mark Wooding [Fri, 3 May 2024 00:23:16 +0000 (01:23 +0100)]
zone.lisp (:dkim): Use new splitting machinery.
Mark Wooding [Fri, 3 May 2024 00:14:43 +0000 (01:14 +0100)]
zone.lisp: Split a single `:txt' string into small enough pieces.
The substrings of a `:txt' record can be at most 255 bytes long. If the
argument is a single string that's too long then split it into pieces;
prefer to split at semicolons, or spaces.
If the argument is a list of strings, then respect their split.
Theoretically, the split positions are semantically transparent, but
it's possible that some programs are sensitive to the boundaries.
Mark Wooding [Fri, 3 May 2024 00:11:25 +0000 (01:11 +0100)]
net.lisp: Print addresses and nets usefully when `*print-escape*' is off.
Mark Wooding [Sat, 4 May 2024 23:52:04 +0000 (00:52 +0100)]
zone.lisp (rec-raw-string): Fix garbled punctuation in commentary.
Mark Wooding [Tue, 30 Apr 2024 16:33:39 +0000 (17:33 +0100)]
zone.lisp: Support `DNAME' records.
Mark Wooding [Tue, 30 Apr 2024 16:08:23 +0000 (17:08 +0100)]
zone.lisp: Tighten up the default SOA parameters.
Reduce all of the timeouts. The TTL is halved from eight to four
hours, because I think I can cope. And the secondary synchronization
parameters are reduced partly because everything uses `NOTIFY' these
days, and partly because I'm using DNSSEC with short validity periods,
and holding on to records for longer is just pointless.
Mark Wooding [Tue, 30 Apr 2024 00:39:00 +0000 (01:39 +0100)]
frontend.lisp: Return a non-nil result for `cl-launch''s benefit.
Mark Wooding [Sun, 28 Apr 2024 11:13:18 +0000 (12:13 +0100)]
frontend.lisp: Allow command-line overrides of timeout parameters.
Mark Wooding [Sun, 28 Apr 2024 11:11:43 +0000 (12:11 +0100)]
zone.lisp: Use `*default-zone-ttl*' as the default zone TTL.
Mark Wooding [Sun, 4 Feb 2024 19:38:16 +0000 (19:38 +0000)]
net.lisp: Report some more useful errors.
Mark Wooding [Sun, 4 Feb 2024 19:37:54 +0000 (19:37 +0000)]
frontend.lisp: Return non-nil from `main'.
Otherwise some versions of `cl-launch' force a nonzero exit status.
Mark Wooding [Wed, 27 Jun 2018 08:18:21 +0000 (09:18 +0100)]
zone.lisp: Maintain `:sshfp' fingerprints in binary internally.
This means that we can format them with line splitting, which is good.
Mark Wooding [Tue, 19 Sep 2017 17:14:21 +0000 (18:14 +0100)]
zone.lisp: Add support for CAA records (RFC 6844).
Mark Wooding [Tue, 19 Sep 2017 17:13:41 +0000 (18:13 +0100)]
zone.lisp: Sink `&allow-other-keys' until after the keyword arguments.
The spec is clear that it must be like this.
Mark Wooding [Tue, 19 Sep 2017 17:13:06 +0000 (18:13 +0100)]
zone.lisp: Don't try to take the `car' of something we know isn't a list.
Mark Wooding [Tue, 19 Sep 2017 17:11:59 +0000 (18:11 +0100)]
zone.lisp: Sink `zone-text-name' until after `zone' structure is defined.
Muffles a warning from SBCL, which was sad because it couldn't inline a
structure accessor.
Mark Wooding [Sat, 8 Jul 2017 13:59:13 +0000 (14:59 +0100)]
zone.lisp: Include SSHFP type code for
Ed25519 keys.
Mark Wooding [Thu, 26 Mar 2015 01:43:46 +0000 (01:43 +0000)]
zone.lisp: Support for DS records.
Mark Wooding [Wed, 25 Mar 2015 21:06:38 +0000 (21:06 +0000)]
zone.lisp (devrevzone): Remove trailing dot on the zone name.
It doesn't help anything, and it screws up the serial-file names.
Mark Wooding [Mon, 22 Dec 2014 20:32:58 +0000 (20:32 +0000)]
zone.lisp: Memoize the conversion of TLSA association-data files.
Mark Wooding [Mon, 22 Dec 2014 20:32:58 +0000 (20:32 +0000)]
zone.lisp: Use a synthetic pathname as the temporary-files template.
Mark Wooding [Mon, 22 Dec 2014 20:32:58 +0000 (20:32 +0000)]
zone.lisp: Include configurable search path for TLSA association data.
Mark Wooding [Mon, 22 Dec 2014 20:32:58 +0000 (20:32 +0000)]
zone.lisp: Allow pathnames as input to `:sshfp' records.
Mark Wooding [Mon, 22 Dec 2014 20:32:58 +0000 (20:32 +0000)]
zone.lisp, frontend.lisp: New configuration-variable machinery.
Maintain a list `*zone-config*' of configuration variables, and have the
frontend rebind these around each input file. Add
`*sshfp-pathname-defaults*' and `*dkim-pathname-defaults*' to the list.
Mark Wooding [Mon, 22 Dec 2014 20:32:58 +0000 (20:32 +0000)]
zone.lisp: Close output files after writing.
Otherwise we end up with lots of open files for no good reason.
Mark Wooding [Mon, 22 Dec 2014 22:20:56 +0000 (22:20 +0000)]
zone.lisp: Support for TLSA records.
Mark Wooding [Mon, 22 Dec 2014 22:19:50 +0000 (22:19 +0000)]
zone.lisp: New utility for hashing files.
Mark Wooding [Mon, 22 Dec 2014 22:19:17 +0000 (22:19 +0000)]
sys.lisp: New toy for running external programs.
Mark Wooding [Mon, 22 Dec 2014 22:16:53 +0000 (22:16 +0000)]
sys.lisp: New tools for making temporary files.
Not used yet. Wait for it...
Mark Wooding [Mon, 22 Dec 2014 20:44:10 +0000 (20:44 +0000)]
zone.lisp: Some new utilities for handling raw binary strings.
Mark Wooding [Mon, 22 Dec 2014 20:40:11 +0000 (20:40 +0000)]
zone.lisp: Abstract out Bind hex output from `zone-write-raw-rrdata'.
It's had a bit of a rewrite (to do less consing) during the move.
Mark Wooding [Mon, 22 Dec 2014 20:37:40 +0000 (20:37 +0000)]
zone.lisp: Have `bind-format-record''s caller provide the newline.
This allows callers to append their own stuff if they want to.
Mark Wooding [Mon, 22 Dec 2014 20:41:48 +0000 (20:41 +0000)]
zone.lisp: Change the `:sshfp' option tags to be keywords.
Mark Wooding [Mon, 22 Dec 2014 22:20:37 +0000 (22:20 +0000)]
zone.lisp: Escape DEL in TinyDNS output.
Mark Wooding [Mon, 22 Dec 2014 20:42:30 +0000 (20:42 +0000)]
zone.lisp: Some minor reformatting.
Mark Wooding [Mon, 22 Dec 2014 20:32:58 +0000 (20:32 +0000)]
zone.lisp: Abstract out and improve the enum machinery from `:sshfp'.
We're going to want it for something else soon. Also add ancillary
functionality for reverse lookups and iteration, and a switch
controlling exports.
Mark Wooding [Sat, 20 Dec 2014 20:10:35 +0000 (20:10 +0000)]
zone.lisp: Fix the docstring for `:srv' records.
Missing the `:protocol' key, for no especially obvious reason.
Mark Wooding [Thu, 22 May 2014 09:06:00 +0000 (10:06 +0100)]
zone.lisp: Silence warning from CLisp.
Mark Wooding [Wed, 21 May 2014 16:02:43 +0000 (17:02 +0100)]
Handle domain names properly, including RFC1035 quoting.
It's all rather invasive, but the result is a definite improvement.
Mark Wooding [Wed, 30 Apr 2014 15:08:13 +0000 (16:08 +0100)]
zone.lisp: Export `tinydns-output', because it looks handy.
Extensions adding new record types might want this.
Mark Wooding [Wed, 30 Apr 2014 15:17:09 +0000 (16:17 +0100)]
zone.lisp: General support for unknown record types.
There's now a `zone-record-rrdata' protocol for zone record types to
serialize themselves in the correct format, and implementations for all
of the record types currently emitted.
There's also a `zone-write-raw-rrdata' protocol for writing these out
when the format doesn't have a better plan, which is used by a (new)
default method on `zone-write-record'.
Mark Wooding [Wed, 30 Apr 2014 15:12:23 +0000 (16:12 +0100)]
zone.lisp: Refactor the output stage.
Provide a default implementation of `zone-write', which does the tedious
business of iterating over the individual records. Make the output
formats use this new protocol.
Mark Wooding [Wed, 30 Apr 2014 14:41:05 +0000 (15:41 +0100)]
zone.lisp: Refactor and improve the domain-name sorting.
Sort the components according to a `natural' ordering which tries to do
approximately sane things with numeric sequences. It's not always
successful: in particular, it wants to order 144, 144-159, 145, ...; but
it's not too awful.
Mark Wooding [Wed, 30 Apr 2014 10:11:10 +0000 (11:11 +0100)]
zone.lisp: For BIND output, omit record names where possible.
This makes the output easier to read, especially now the records are
sorted.
Mark Wooding [Wed, 30 Apr 2014 10:10:27 +0000 (11:10 +0100)]
zone.lisp: Sort records for presentation.
Currently order by domain components, right to left, and then by RRTYPE
name.
Mark Wooding [Mon, 28 Apr 2014 14:59:30 +0000 (15:59 +0100)]
frontend.lisp: Import MOP hacking for CLisp.
Mark Wooding [Mon, 28 Apr 2014 09:05:20 +0000 (10:05 +0100)]
zone.lisp: Output format for Daniel Bernstein's `tinydns' server.
Mark Wooding [Mon, 28 Apr 2014 09:04:33 +0000 (10:04 +0100)]
zone.lisp: A bunch of functions for building raw DNS records.
Not used yet. Soon...
Mark Wooding [Mon, 28 Apr 2014 09:03:50 +0000 (10:03 +0100)]
zone.lisp: TXT record data is always a list of strings.
Never a singleton. Otherwise all output formats must do the listifying
separately, and that's just annoying.
Mark Wooding [Mon, 28 Apr 2014 09:02:26 +0000 (10:02 +0100)]
frontend.lisp: New `-D' option to generate stack backtrace on error.
This is a frequent debugging modification, so I might as well make it
official.
The fundamental problem is that tracking down errors in a zone
description file is a complete nightmare. This needs fixing some time.
Mark Wooding [Fri, 25 Apr 2014 23:10:46 +0000 (00:10 +0100)]
zone.lisp: Stringify the zone name at construction time.
It causes trouble later if we don't.
Mark Wooding [Fri, 25 Apr 2014 23:10:14 +0000 (00:10 +0100)]
zone.lisp: Remove unnecessary parens in definition of `:multi'.
Mark Wooding [Fri, 25 Apr 2014 21:37:17 +0000 (22:37 +0100)]
Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/zone
* 'master' of git.distorted.org.uk:~mdw/publish/public-git/zone:
addr-family-ipv6.lisp (ipaddr-string): Ignore trivial runs of zeros.
addr-family-ipv6.lisp (ipaddr-string): Use IPv4 notation if appropriate.
addr-family-ipv6.lisp (ipaddr-string): Upend the conditional.
Mark Wooding [Tue, 22 Apr 2014 13:14:24 +0000 (14:14 +0100)]
addr-family-ipv6.lisp (ipaddr-string): Ignore trivial runs of zeros.
It seems that the convention is to write addresses out longhand if they
have only isolated zero components. So do that here too.
Mark Wooding [Tue, 22 Apr 2014 13:12:48 +0000 (14:12 +0100)]
addr-family-ipv6.lisp (ipaddr-string): Use IPv4 notation if appropriate.
This supports the v4-mapped range ::ffff:0.0.0.0/96, and the deprecated
v4-compatible range ::0.0.0.0/96 (with an exception for ::0/112 so that
the magic addresses ::1 and :: still comes out OK). The output
behaviour here seems to match Linux's inet_ntop(3).
Mark Wooding [Tue, 22 Apr 2014 13:10:58 +0000 (14:10 +0100)]
addr-family-ipv6.lisp (ipaddr-string): Upend the conditional.
Put the simple fully-populated case first.
Mark Wooding [Sat, 13 Jul 2013 15:34:40 +0000 (16:34 +0100)]
zone.lisp: Move zone administrator address onto its own line.
Prevents SOA records with an out-of-zone source from spilling out to the
right so much.
Mark Wooding [Sat, 13 Jul 2013 15:34:40 +0000 (16:34 +0100)]
net.lisp: Write a bunch of better docstrings.
Mark Wooding [Sat, 13 Jul 2013 15:34:40 +0000 (16:34 +0100)]
net.lisp: Factor out family-switch form parsing, and fix it.
Both `host-parse' and `net-parse-to-ipnets' had common code for
handling ((:FAMILY . ITEM)*) forms, but they (a) handled them
differently if an explicit family was provided, and (b) both
implementations were wrong.
Split out the necessary functionality, and implement it correctly.
Mark Wooding [Sat, 13 Jul 2013 15:34:40 +0000 (16:34 +0100)]
zone.lisp: Export function and macro for iterating over hosts.
Mark Wooding [Sat, 13 Jul 2013 15:34:40 +0000 (16:34 +0100)]
net.lisp: Support string-like host designations in `net-host'.
Mark Wooding [Sat, 13 Jul 2013 15:34:40 +0000 (16:34 +0100)]
net.lisp: net.lisp: Refactor `string-subipnet' and its friends.
* Kill `ipnet-subnet', which wasn't used anywhere else anyway.
Replace with `check-subipnet', with a different interface.
* Add `:slashp' argument to `parse-subnet', controlling whether it
bothers to detect a `/'.
* Introduce `parse-subipnet' as a higher-level interface to
`parse-subnet'.
Mark Wooding [Sat, 13 Jul 2013 15:34:40 +0000 (16:34 +0100)]
net.lisp: Add docstring for `string-subipnet'.
Mark Wooding [Sat, 13 Jul 2013 15:34:40 +0000 (16:34 +0100)]
net.lisp: Whitespace fixup.
Mark Wooding [Sat, 13 Jul 2013 15:34:40 +0000 (16:34 +0100)]
net.lisp: Improve error in `ipmask'.
Mark Wooding [Tue, 15 Apr 2014 15:42:05 +0000 (16:42 +0100)]
net.lisp, zone.lisp: Support for IPv6 addresses.
This just pretty much slots in now. After an awful lot of work making
slots which are exactly the right shape!
Mark Wooding [Tue, 15 Apr 2014 13:02:06 +0000 (14:02 +0100)]
net.lisp, zone.lisp: Major overhaul for multiple address families.
A lot of internals have changed, and some user-visible features have
been dropped.
* IP addresses and networks are now captured in CLOS objects, and the
low-level details of messing with them are handled in generic
functions which live in their own separate files.
* `ipnet-pretty' has gone. Now `ipnet' objects are directly
printable.
* `ipnet-changeable-bytes' has gone; there's now
`ipnet-changeable-bits' instead.
* `host' and `net' objects now track multiple addresses, so accessing
them is a bit different. `net-get-as-ipnet' has gone, replaced by
`net-parse-to-ipnets'. Acceptable syntaxes have mostly been
enhanced, with the ability to control which address families are
emitted.
* Slightly painfully, support for DNS lookups has been dropped --
because SBCL doesn't have a good way of doing IPv6 lookups.
* The `:cidr-delegation' record parser has gone, and been replaced by
`:multi', which can be used to achieve the same thing (and a number
of other special effects besides).
* For the sake of sanity, the `:a' record parser only produces A
records. The new `:addr' parser will produce records for all
address families associated with its input.
Mark Wooding [Tue, 15 Apr 2014 10:57:24 +0000 (11:57 +0100)]
net.lisp, zone.lisp: Improve commentary and docstrings.
Also one or two minor whitespace fixes.
Mark Wooding [Tue, 15 Apr 2014 13:39:15 +0000 (14:39 +0100)]
zone.lisp: Change `zone-parse-records' interface to be more useful.
Now it returns a list of the processed records rather than appending
them to a zone object.
Mark Wooding [Tue, 15 Apr 2014 14:02:31 +0000 (15:02 +0100)]
zone.lisp: Apply pathname templates to DKIM and SSHFP files.
Makes zone files nicer. Alas, not compatible; sorry.
Mark Wooding [Tue, 15 Apr 2014 13:53:39 +0000 (14:53 +0100)]
zone.lisp: Fix `:sshfp' handling of literals.
It was, unfortunately, completely broken.
Mark Wooding [Tue, 15 Apr 2014 11:00:49 +0000 (12:00 +0100)]
zone.lisp: Fix default output directory.
The code used to capture `*default-pathname-defaults*' in
`*zone-output-path*' at load time, which (varying by implementation)
might indicate the calling process's working directory, or might be the
directory from which the file was loaded. The latter is obviously
wrong, so we adopt the convention in `zone-file-name' that if
`*zone-output-path*' is nil then we use `*default-pathname-defaults'
from the time of the call.
Mark Wooding [Thu, 3 Apr 2014 17:44:26 +0000 (18:44 +0100)]
zone.lisp: Support for SSHFP records.
Fingerprints can be supplied explicitly or read from files in the
format written by ssh-keygen(1).
Mark Wooding [Thu, 3 Apr 2014 16:21:44 +0000 (17:21 +0100)]
zone.lisp: Support for DKIM key records.
Reads the key data from a PEM file. Splits stuff into multiple lines in
a vaguely sensible way.
Mark Wooding [Thu, 3 Apr 2014 16:20:25 +0000 (17:20 +0100)]
zone.lisp: Support multi-line TXT records.
Mark Wooding [Sun, 29 Dec 2013 21:21:24 +0000 (21:21 +0000)]
zone.lisp: Mark an ignored function parameter.
CLisp complains about this one, but SBCL doesn't mind.
Mark Wooding [Sun, 29 Dec 2013 21:18:56 +0000 (21:18 +0000)]
zone.lisp: Improve commentary regarding the syntax of record forms.
Mark Wooding [Sun, 29 Dec 2013 20:39:28 +0000 (20:39 +0000)]
zone.lisp: Minor comment formatting.
Mark Wooding [Sun, 29 Dec 2013 20:41:15 +0000 (20:41 +0000)]
zone.lisp: Clean up whitespace.
Mark Wooding [Sat, 8 Dec 2012 15:07:43 +0000 (15:07 +0000)]
zone.lisp: Choose first matching record for preferred subnet.
The old (overly imperative) algorithm picked the last, which doesn't fit
with the fallback to the first record if none is preferred.
Mark Wooding [Sun, 22 Apr 2012 17:55:48 +0000 (18:55 +0100)]
sys.lisp: Use OS:UNAME rather than UNIX:GET-HOST-NAME in CLisp.
The latter appears to have been withdrawn in later versions of CLisp.
Mark Wooding [Sun, 11 Mar 2012 04:53:36 +0000 (04:53 +0000)]
zone.lisp: Rename `broadcast' to `bcast' in :NET records.
Mark Wooding [Sun, 11 Mar 2012 04:50:55 +0000 (04:50 +0000)]
zone.lisp: Reverse delegation for multiple subnets into the same target.
Just a notational convenience.
Mark Wooding [Sun, 11 Mar 2012 04:49:29 +0000 (04:49 +0000)]
zone.lisp: Better documentation for reverse-zone directives.
Mark Wooding [Tue, 6 Sep 2011 11:46:00 +0000 (12:46 +0100)]
Run via core file.
This gives rather faster response. Maybe when this machinery moves to a
faster machine it'll be worth reverting this change, but right now it
seems good.
Mark Wooding [Tue, 6 Sep 2011 11:44:19 +0000 (12:44 +0100)]
frontend.lisp: Whitespace fixing.
Mark Wooding [Tue, 6 Sep 2011 11:42:42 +0000 (12:42 +0100)]
serv.lisp: Spread exports throughout the file.
Mark Wooding [Sun, 22 May 2011 14:28:34 +0000 (15:28 +0100)]
zone.lisp: Reformat, scattering exports.
Put the exports near the things they export. This makes it easier to
see whether a function is exported, and keep track of exports when
things get refactored.
Mark Wooding [Sun, 22 May 2011 14:28:14 +0000 (15:28 +0100)]
zone.lisp: Add support for TXT records.
Mark Wooding [Sun, 22 May 2011 14:10:48 +0000 (15:10 +0100)]
net.lisp, sys.lisp: Merge packages.
Separate out the package defintion into a new file `net-package.lisp'.
Scatter the EXPORT directives so that they decorate the functions they
refer to.
This was prompted because of a dependency cycle in a CLisp-specific
part of sys.lisp.