class CSYNCRecordValidator implements DnsRecordValidatorInterface (View source)

Validator for CSYNC DNS records

CSYNC (Child-To-Parent Synchronization) records are used to synchronize DNS data from a child zone to its parent zone as defined in RFC 7477.

The format is:

  • SOA-Serial: 32-bit unsigned integer (0 - 4,294,967,295) representing a minimum SOA serial number that a parental agent needs to see
  • Flags: 16-bit field containing boolean flags: 0x0000 (0): No flags set 0x0001 (1): "immediate" - when set, parental agent may process record immediately 0x0002 (2): "soaminimum" - when set, enforces SOA serial number validation 0x0003 (3): Both flags set
  • Type-Bit-Map: The set of record types to be synchronized (space-separated)

Methods

__construct(ConfigurationManager $config)

Constructor

validate(string $content, string $name, mixed $prio, int|string|null $ttl, int $defaultTTL, mixed ...$args)

Validate CSYNC record

validateCSYNCContent(string $content)

Check if CSYNC content is valid

validateCSYNCRecordContent(string $content)

Validate CSYNC content for public use

Details

__construct(ConfigurationManager $config)

Constructor

Parameters

ConfigurationManager $config

ValidationResult validate(string $content, string $name, mixed $prio, int|string|null $ttl, int $defaultTTL, mixed ...$args)

Validate CSYNC record

Parameters

string $content

The content part of the record

string $name

The name part of the record

mixed $prio

The priority value (if applicable)

int|string|null $ttl

The TTL value

int $defaultTTL

The default TTL to use if not specified

mixed ...$args

Additional validator-specific parameters

Return Value

ValidationResult

ValidationResult containing validated data or error messages

ValidationResult validateCSYNCContent(string $content)

Check if CSYNC content is valid

Validates the CSYNC record content according to RFC 7477 requirements.

Parameters

string $content

CSYNC record content

Return Value

ValidationResult

ValidationResult containing validation result

ValidationResult validateCSYNCRecordContent(string $content)

Validate CSYNC content for public use

Validates the CSYNC record content according to RFC 7477 requirements and returns a ValidationResult with appropriate warnings.

Parameters

string $content

CSYNC record content

Return Value

ValidationResult

ValidationResult containing validation status, error message, or warnings