github.com/StackExchange/dnscontrol/v4@v4.11.0/documentation/language-reference/top-level-functions/REVCOMPAT.md (about)

     1  ---
     2  name: REVCOMPAT
     3  parameters:
     4    - rfc
     5  parameter_types:
     6    rfc: string
     7  ts_return: string
     8  ---
     9  
    10  `REVCOMPAT()` controls which RFC the [`REV()`](REV.md) function adheres to.
    11  
    12  Include one of these two commands near the top `dnsconfig.js` (at the global level):
    13  
    14  {% code title="dnsconfig.js" %}
    15  ```javascript
    16  REVCOMPAT("rfc2317");  // RFC 2117: Compatible with old files.
    17  REVCOMPAT("rfc4183");  // RFC 4183: Adopt the newer standard.
    18  ```
    19  {% endcode %}
    20  
    21  `REVCOMPAT()` is global for all of `dnsconfig.js`. It must appear before any
    22  use of `REV()`; If not, behavior is undefined.
    23  
    24  # RFC 4183 vs RFC 2317
    25  
    26  RFC 2317 and RFC 4183 are two different ways to implement reverse lookups for
    27  CIDR blocks that are not on 8-bit boundaries (/24, /16, /8).
    28  
    29  Originally DNSControl implemented the older standard, which only specifies what
    30  to do for /8, /16, /24 - /32.  Using `REV()` for /9-17 and /17-23 CIDRs was an
    31  error.
    32  
    33  v4 defaults to RFC 2317.  In v5.0 the default will change to RFC 4183.
    34  `REVCOMPAT()` is provided for those that wish to retain the old behavior.
    35  
    36  For more information, see [Opinion #9](../../opinions.md#opinion-9-rfc-4183-is-better-than-rfc-2317).
    37  
    38  # Transition plan
    39  
    40  What's the default behavior if `REVCOMPAT()` is not used?
    41  
    42  | Version | /9 to /15 and /17 to /23 | /25 to 32 | Warnings                   |
    43  |---------|--------------------------|-----------|----------------------------|
    44  | v4      | RFC 4183                 | RFC 2317  | Only if /25 - /32 are used |
    45  | v5      | RFC 4183                 | RFC 4183  | none                       |
    46  
    47  No warnings are generated if the `REVCOMPAT()` function is used.