about summary refs log tree commit diff
path: root/shared/n-acd/src/n-acd-bpf-fallback.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2019-03-26 23:25:23 +0100
committerMichael Biebl <biebl@debian.org>2019-03-26 23:25:23 +0100
commit9a6dcbf895f9da01768e64b73cec88c16157d91e (patch)
treea359958930d731e9f1b59344642e10754419fe84 /shared/n-acd/src/n-acd-bpf-fallback.c
parent964ae8cc391520440cf5aa13e2b9cc34850ea6c2 (diff)
New upstream version 1.16.0 upstream/1.16.0
Diffstat (limited to 'shared/n-acd/src/n-acd-bpf-fallback.c')
-rw-r--r--shared/n-acd/src/n-acd-bpf-fallback.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/shared/n-acd/src/n-acd-bpf-fallback.c b/shared/n-acd/src/n-acd-bpf-fallback.c
new file mode 100644
index 00000000..7270cfd9
--- /dev/null
+++ b/shared/n-acd/src/n-acd-bpf-fallback.c
@@ -0,0 +1,29 @@
+/*
+ * A noop implementation of eBPF filter for IPv4 Address Conflict Detection
+ *
+ * These are a collection of dummy functions that have no effect, but allows
+ * n-acd to compile without eBPF support.
+ *
+ * See n-acd-bpf.c for documentation.
+ */
+
+#include <stddef.h>
+#include "n-acd-private.h"
+
+int n_acd_bpf_map_create(int *mapfdp, size_t max_entries) {
+        *mapfdp = -1;
+        return 0;
+}
+
+int n_acd_bpf_map_add(int mapfd, struct in_addr *addrp) {
+        return 0;
+}
+
+int n_acd_bpf_map_remove(int mapfd, struct in_addr *addrp) {
+        return 0;
+}
+
+int n_acd_bpf_compile(int *progfdp, int mapfd, struct ether_addr *macp) {
+        *progfdp = -1;
+        return 0;
+}