From df853d56f4f65e5798a41e58a6821da3908f0861 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 18 Jan 2023 15:23:39 -0500 Subject: Add $INCLUDE support This doesn't support the origin stacking defined in RFC 1034 because: 1. Doing so would require us to maintain a real $INCLUDE stack instead of just chaining iterators; and 2. The expected use case is including automatically-generated snippets in zones that are being maintained with zc, so there's no real need for origin fiddling anyway because whatever automation is generating the snippets can just generate FQDNs if necessary. If really needed, we could fix this, but, YAGNI. --- README.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 5ac11e8..7c7eb2e 100644 --- a/README.md +++ b/README.md @@ -423,12 +423,26 @@ Examples: $RANGE dhcp-f{:03x} 10.1.0.50 10.2.255.254 50 -#### `$INCLUDE` and `$GENERATE` #### +#### `$INCLUDE` #### -The `$INCLUDE` and `$GENERATE` control operators are not currently implemented. +`$INCLUDE` is a standard control operator, but for the main expected +`zc` use cases there's not much need for it. -`$INCLUDE` is a standard control operator, but we appear to have no -current need for it. +`zc` supports a limited form of the `$INCLUDE` operator, intended +mainly for automation (that is, for cases where one wants to include a +machine-generated set of DNS data into a larger zone that you're +maintaining with `zc`). Limitations: + +1. `zc` doesn't support the optional `origin` field of the `$INCLUDE` + operator as defined in RFC 1035. + +2. `zc` does *not* preserve the current `$ORIGIN` value of the outer + file while processing `$INCLUDE`, so if the included file changes + the `$ORIGIN`, the outer file will see that change. Don't do that. + +#### `$GENERATE` #### + +The `$GENERATE` control operators is not currently implemented. `$GENERATE` is a BIND-specific control operator. We could implement it if there were a real need, but the `$RANGE` operator covers the -- cgit v1.2.3