]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Update document
authorY7n05h <Y7n05h@protonmail.com>
Thu, 14 Apr 2022 12:40:57 +0000 (20:40 +0800)
committerY7n05h <Y7n05h@protonmail.com>
Thu, 14 Apr 2022 13:49:12 +0000 (21:49 +0800)
pdns/dnsdistdist/docs/advanced/ebpf.rst

index 8ce03c74f7eef971daf82bdf556cf7552317e84b..4457c1b2630d513ef566c7b0c9e00321b7defe2d 100644 (file)
@@ -16,7 +16,7 @@ The following figure show the CPU usage of dropping around 20k qps of traffic, f
 
 The BPF filter can be used to block incoming queries manually::
 
-  > bpf = newBPFFilter(1024, 1024, 1024)
+  > bpf = newBPFFilter({ipv4MaxItems=1024, ipv6MaxItems=1024, qnamesMaxItems=1024})
   > bpf:attachToAllBinds()
   > bpf:block(newCA("2001:DB8::42"))
   > bpf:blockQName(newDNSName("evildomain.com"), 255)
@@ -37,12 +37,12 @@ The :meth:`BPFFilter:attachToAllBinds` method attaches the filter to every exist
 
 The :meth:`BPFFilter:attachToAllBinds` automatically attached to every bind::
 
-  bpf = newBPFFilter(1024, 1024, 1024)
+  bpf = newBPFFilter({ipv4MaxItems=1024, ipv6MaxItems=1024, qnamesMaxItems=1024})
   setDefaultBPFFilter(bpf)
 
 Finally, it's also possible to attach it to specific binds at runtime::
 
-  > bpf = newBPFFilter(1024, 1024, 1024)
+  > bpf = newBPFFilter({ipv4MaxItems=1024, ipv6MaxItems=1024, qnamesMaxItems=1024})
   > showBinds()
   #   Address              Protocol  Queries
   0   [::]:53              UDP       0
@@ -52,7 +52,7 @@ Finally, it's also possible to attach it to specific binds at runtime::
 
 :program:`dnsdist` also supports adding dynamic, expiring blocks to a BPF filter::
 
-  bpf = newBPFFilter(1024, 1024, 1024)
+  bpf = newBPFFilter({ipv4MaxItems=1024, ipv6MaxItems=1024, qnamesMaxItems=1024})
   setDefaultBPFFilter(bpf)
   dbpf = newDynBPFFilter(bpf)
   function maintenance()