]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix XSK mode detection when built with `meson` 15315/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 17 Mar 2025 11:44:57 +0000 (12:44 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 17 Mar 2025 11:44:57 +0000 (12:44 +0100)
The detection of whether `bpf_xdp_query` is available was not done.

pdns/dnsdistdist/meson/xsk/meson.build

index fa1af334ce6b74304546ff996782c8035b60761d..65f477096f4a16e8e12d811890c41a661468ac4a 100644 (file)
@@ -3,6 +3,11 @@ if opt_xsk.allowed()
   dep_libbpf = dependency('libbpf', required: opt_xsk.enabled())
   dep_libxdp = dependency('libxdp', required: opt_xsk.enabled())
 
+  if dep_libbpf.found() and dep_libxdp.found()
+    has = cxx.has_function('bpf_xdp_query', dependencies: dep_libbpf)
+    conf.set('HAVE_BPF_XDP_QUERY', has, description: 'Have BPF bpf_xdp_query')
+  endif
+
   conf.set('HAVE_BPF', dep_libbpf.found(), description: 'BPF library')
   conf.set('HAVE_XDP', dep_libxdp.found(), description: 'XDP library')
   conf.set('HAVE_XSK', dep_libbpf.found() and dep_libxdp.found(), description: 'AF_XDP (XSK) support enabled')