]> granicus.if.org Git - pdns/commitdiff
XPF, dnsdist: Rename Option Code to RR Code
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 23 Jan 2018 09:21:26 +0000 (10:21 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 23 Jan 2018 10:18:24 +0000 (11:18 +0100)
And add some docs.

pdns/dnsdist-lua.cc
pdns/dnsdist-tcp.cc
pdns/dnsdist.cc
pdns/dnsdist.hh
pdns/dnsdistdist/docs/reference/config.rst

index 0be2c3e84fd3f5274c28891539293a94b47fd67e..d8a8c916f2e1e16637922fcba8aa2960452ef3f6 100644 (file)
@@ -310,7 +310,7 @@ void setupLuaConfig(bool client)
                        }
 
                        if(vars.count("addXPF")) {
-                          ret->xpfOptionCode=std::stoi(boost::get<string>(vars["addXPF"]));
+                          ret->xpfRRCode=std::stoi(boost::get<string>(vars["addXPF"]));
                        }
 
                        if(vars.count("maxCheckFailures")) {
index 13be397e9406a60d32c8f609ca4bc2401deae3a3..12634107c59532d75a5ce4ba9511aa89984459b8 100644 (file)
@@ -440,8 +440,8 @@ void* tcpClientThread(int pipefd)
           break;
         }
 
-        if (dq.addXPF && ds->xpfOptionCode != 0) {
-          addXPF(dq, ds->xpfOptionCode);
+        if (dq.addXPF && ds->xpfRRCode != 0) {
+          addXPF(dq, ds->xpfRRCode);
         }
 
        int dsock = -1;
index 74924d3ec9ea825db37ef8d04c742816f88ce9a5..3cd4d2c4c01513e7e8bc8c026f32a0c20e8dd6d0 100644 (file)
@@ -1389,8 +1389,8 @@ static void processUDPQuery(ClientState& cs, LocalHolders& holders, const struct
       return;
     }
 
-    if (dq.addXPF && ss->xpfOptionCode != 0) {
-      addXPF(dq, ss->xpfOptionCode);
+    if (dq.addXPF && ss->xpfRRCode != 0) {
+      addXPF(dq, ss->xpfRRCode);
     }
 
     ss->queries++;
index 6352f205f7948473ea71d800e69c6af60dca0f46..19e2db2dd75865df7a4b54d56288e4db5d1a851b 100644 (file)
@@ -624,7 +624,7 @@ struct DownstreamState
   int tcpSendTimeout{30};
   unsigned int sourceItf{0};
   uint16_t retries{5};
-  uint16_t xpfOptionCode{0};
+  uint16_t xpfRRCode{0};
   uint8_t currentCheckFailures{0};
   uint8_t maxCheckFailures{1};
   StopWatch sw;
index 401437563c80aaf5acf83a2a3ef588aee8811e67..bf2dbe77903f6a56c6ecf985025b26337a245dd6 100644 (file)
@@ -269,7 +269,7 @@ Servers
                              --   "interface name", e.g. "eth0"
                              --   "address@interface", e.g. "192.0.2.2@eth0"
       addXPF=NUM             -- Add the client's IP address and port to the query, along with the original destination address and port,
-                             -- using the experimental XPF record from `draft-bellis-dnsop-xpf` and the specified option code. Default is disabled (0)
+                             -- using the experimental XPF record from `draft-bellis-dnsop-xpf <https://datatracker.ietf.org/doc/draft-bellis-dnsop-xpf/>`_ and the specified option code. Default is disabled (0)
     })
 
   :param str server_string: A simple IP:PORT string.