]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: do not store ECS scope 0 carrying requests/replies in the packet cache
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 8 Apr 2026 11:56:26 +0000 (13:56 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 8 Jun 2026 09:44:25 +0000 (11:44 +0200)
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/recursordist/pdns_recursor.cc

index bcf7065e35dc60b4c80566bab3f15000c0e916fe..1350f6ca9163948ede7893ef478a88d4f875de96 100644 (file)
@@ -1601,6 +1601,10 @@ void startDoResolve(void* arg) // NOLINT(readability-function-cognitive-complexi
   sendit:;
 
     if (g_useIncomingECS && comboWriter->d_ecsFound && !resolver.wasVariable() && !variableAnswer) {
+      // The moment we add an ECS option we should no longer packet cache this.  An alternative is to
+      // overwrite the ECS info after retrieval from the packet cache, but that is much more
+      // complicated.
+      variableAnswer = true;
       EDNSSubnetOpts ednsOptions;
       ednsOptions.setSource(comboWriter->d_ednssubnet.getSource());
       ComboAddress sourceAddr;