From bd1e67ab639ceb0aaceac2c5e9af2d1d2cfff02d Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 15 Jan 2024 17:01:26 +0100 Subject: [PATCH] dnsdist: Fix XSK/AF_XDP detection --- pdns/dnsdistdist/configure.ac | 4 ++++ pdns/dnsdistdist/m4/pdns_with_xsk.m4 | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/configure.ac b/pdns/dnsdistdist/configure.ac index d9f6c719dd..81e39c8bc9 100644 --- a/pdns/dnsdistdist/configure.ac +++ b/pdns/dnsdistdist/configure.ac @@ -219,6 +219,10 @@ AS_IF([test "x$systemd" != "xn"], [AC_MSG_NOTICE([systemd: yes])], [AC_MSG_NOTICE([systemd: no])] ) +AS_IF([test x"$BPF_LIBS" != "x" -a x"$XDP_LIBS" != "x"], + [AC_MSG_NOTICE([AF_XDP/XSK: yes])], + [AC_MSG_NOTICE([AF_XDP/XSK: no])] +) AS_IF([test "x$HAVE_IPCIPHER" = "x1"], [AC_MSG_NOTICE([ipcipher: yes])], [AC_MSG_NOTICE([ipcipher: no])] diff --git a/pdns/dnsdistdist/m4/pdns_with_xsk.m4 b/pdns/dnsdistdist/m4/pdns_with_xsk.m4 index 655d410f80..32cee27077 100644 --- a/pdns/dnsdistdist/m4/pdns_with_xsk.m4 +++ b/pdns/dnsdistdist/m4/pdns_with_xsk.m4 @@ -17,8 +17,12 @@ AC_DEFUN([PDNS_WITH_XSK],[ ], [:]) ]) ]) - AC_DEFINE([HAVE_XSK], [test x"$BPF_LIBS" != "x" -a x"$XDP_LIBS" != "x"], [Define to 1 if you have AF_XDP (XSK) support enabled]) + AM_CONDITIONAL([HAVE_XSK], [test x"$BPF_LIBS" != "x" -a x"$XDP_LIBS" != "x"]) + AM_COND_IF([HAVE_XSK], [ + AC_DEFINE([HAVE_XSK], [1], [Define to 1 if you have AF_XDP (XSK) support enabled]) + ]) + AS_IF([test "x$with_xsk" = "xyes"], [ AS_IF([test x"$BPF_LIBS" = "x" -o x"$XDP_LIBS" = "x" ], [ AC_MSG_ERROR([AF_XDP (XSK) support requested but required libbpf and/or libxdp were not found]) -- 2.47.2