]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Use an enum for Policy Kind
authorNicolas Dehaine <nicko@threatstop.com>
Wed, 28 Oct 2020 18:21:11 +0000 (18:21 +0000)
committerNicko Dehaine <nicko@threatstop.com>
Fri, 5 Feb 2021 16:15:38 +0000 (16:15 +0000)
pdns/dnsmessage.proto

index b91534a8b21dc056d61ffc41e17562a473441b88..e14dda908a4809d68fd7470529b57eda2ee8140e 100644 (file)
@@ -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;