]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - m4/pdns_with_ebpf.m4
Update h2o to 2.2.6, fixing CVE-2019-9512, CVE-2019-9514 and CVE-2019-9515
[thirdparty/pdns.git] / m4 / pdns_with_ebpf.m4
index af7a9cf9cfeb582ee285d7f7ba15d8d755476b9f..760bd65510d6eb8c87f114d2eb827d0dd3a91825 100644 (file)
@@ -20,12 +20,19 @@ AC_DEFUN([PDNS_WITH_EBPF],[
   AM_CONDITIONAL([HAVE_EBPF], [test x"$bpf_headers" = "xyes" ])
   AS_IF([test x"$bpf_headers" = "xyes" ],
     [AC_CHECK_DECL(BPF_FUNC_tail_call,
-      [ AC_DEFINE([HAVE_EBPF], [1], [Define if using eBPF.]) ],
+      [ AC_CHECK_DECL(SO_ATTACH_BPF,
+        [ AC_DEFINE([HAVE_EBPF], [1], [Define if using eBPF.]) ],
+        [ AS_IF([test "x$with_ebpf" = "xyes"], [
+          AC_MSG_ERROR([EBPF support requested but SO_ATTACH_BPF not found])
+        ])],
+        [#include <sys/socket.h>
+        ]
+      )],
       [ 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 <linux/bpf.h>]
+        AC_MSG_ERROR([EBPF support requested but BPF_FUNC_tail_call not found in the eBPF headers])
+      ])],
+      [#include <linux/bpf.h>
+      ]
     )]
   )
 ])