File: dns64_schema.py

package info (click to toggle)
knot-resolver 6.0.17-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,376 kB
  • sloc: javascript: 42,732; ansic: 40,311; python: 12,580; cpp: 2,121; sh: 1,988; xml: 193; makefile: 181
file content (21 lines) | stat: -rw-r--r-- 688 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from typing import List, Optional

from knot_resolver.datamodel.types import IPv6Network, IPv6Network96, TimeUnit
from knot_resolver.utils.modeling import ConfigSchema


class Dns64Schema(ConfigSchema):
    """
    DNS64 (RFC 6147) configuration.

    ---
    enable: Enable/disable DNS64.
    prefix: IPv6 prefix to be used for synthesizing AAAA records.
    reverse_ttl: TTL in CNAME generated in the reverse 'ip6.arpa.' subtree.
    exclude_subnets: IPv6 subnets that are disallowed in answer.
    """

    enable: bool = False
    prefix: IPv6Network96 = IPv6Network96("64:ff9b::/96")
    reverse_ttl: Optional[TimeUnit] = None
    exclude_subnets: Optional[List[IPv6Network]] = None