From: Nicolas Dehaine Date: Wed, 28 Oct 2020 18:21:11 +0000 (+0000) Subject: Use an enum for Policy Kind X-Git-Tag: dnsdist-1.6.0-alpha2~19^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12152c8c058a9824ecddd69e8a6c86a545c56869;p=thirdparty%2Fpdns.git Use an enum for Policy Kind --- diff --git a/pdns/dnsmessage.proto b/pdns/dnsmessage.proto index b91534a8b2..e14dda908a 100644 --- a/pdns/dnsmessage.proto +++ b/pdns/dnsmessage.proto @@ -37,6 +37,14 @@ message PBDNSMessage { NSDNAME = 5; // Policy matched on the name of one nameserver involved NSIP = 6; // Policy matched on the IP of one nameserver involved } + enum PolicyKind { + NoAction = 1; // No action taken + Drop = 2; // https://tools.ietf.org/html/draft-vixie-dns-rpz-04 3.4 + NXDOMAIN = 3; // https://tools.ietf.org/html/draft-vixie-dns-rpz-04 3.1 + NODATA = 4; // https://tools.ietf.org/html/draft-vixie-dns-rpz-04 3.2 + Truncate= 5; // https://tools.ietf.org/html/draft-vixie-dns-rpz-04 3.5 + Custom = 6; // https://tools.ietf.org/html/draft-vixie-dns-rpz-04 3.6 + } required Type type = 1; optional bytes messageId = 2; // UUID, shared by the query and the response optional bytes serverIdentity = 3; // ID of the server emitting the protobuf message @@ -74,7 +82,7 @@ message PBDNSMessage { optional PolicyType appliedPolicyType = 7; // Type of the filtering policy (RPZ or Lua) applied optional string appliedPolicyTrigger = 8; // The RPZ trigger optional string appliedPolicyHit = 9; // The value (qname or IP) that caused the hit - optional string appliedPolicyKind = 10; // The Kind (RPZ action) applied by the hit + optional PolicyKind appliedPolicyKind = 10; // The Kind (RPZ action) applied by the hit } optional DNSResponse response = 13;