From 7e8692aa338332c8f7d7e4d65a1a27430f9b4c61 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 8 Jul 2016 10:42:11 +0200 Subject: [PATCH] dnsdist: Disable eBPF support when BPF_FUNC_tail_call is not found --- m4/pdns_with_ebpf.m4 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/m4/pdns_with_ebpf.m4 b/m4/pdns_with_ebpf.m4 index 54c04854a8..af7a9cf9cf 100644 --- a/m4/pdns_with_ebpf.m4 +++ b/m4/pdns_with_ebpf.m4 @@ -18,5 +18,14 @@ AC_DEFUN([PDNS_WITH_EBPF],[ ]) ]) AM_CONDITIONAL([HAVE_EBPF], [test x"$bpf_headers" = "xyes" ]) - AS_IF([test x"$bpf_headers" = "xyes" ], [AC_DEFINE([HAVE_EBPF], [1], [Define if using eBPF.])]) + AS_IF([test x"$bpf_headers" = "xyes" ], + [AC_CHECK_DECL(BPF_FUNC_tail_call, + [ AC_DEFINE([HAVE_EBPF], [1], [Define if using eBPF.]) ], + [ AS_IF([test "x$with_ebpf" = "xyes"], [ + AC_MSG_ERROR([EBPF support requested but BPF_FUNC_tail_call not found in the eBPF headers]) + ]) + ], + [#include ] + )] + ) ]) -- 2.47.2