diff options
author | Rafael Buchbinder <rafi@rbk.ms> | 2017-09-10 10:44:53 +0300 |
---|---|---|
committer | Chenbo Feng <fengc@google.com> | 2018-03-08 19:27:08 +0900 |
commit | ff75e02e65ef4c7b457e245b9d6c3df82aff1798 (patch) | |
tree | 1870edca3f3d6b6679e4c0d27d6c038aad1161fa | |
parent | 8eb1c41e18c279f251fc4daa238e066568ce22e6 (diff) | |
download | iptables-ff75e02e65ef4c7b457e245b9d6c3df82aff1798.tar.gz |
UPSTREAM: extensions: libxt_bpf: fix missing __NR_bpf declaration
This include is needed to compile the bpf_obj_get function properly,
as it brings in the __NR_bpf declaration.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Chenbo Feng <fengc@google.com>
Clean cherry-pick, no conflict.
(cherry picked from commit 895ce096f857ddc85d22144ba84c78ac762e995d)
Test: With BPF_H defined
iptables -t raw -I bw_raw_PREROUTING -m bpf --object-pinned /sys/fs/bpf/xtbpf_prog
should not return error about bpf header not find.
Change-Id: Ia1387e61c8415a9ae6d3532830fbf62414740855
-rw-r--r-- | extensions/libxt_bpf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/extensions/libxt_bpf.c b/extensions/libxt_bpf.c index 92c445e8..9510c190 100644 --- a/extensions/libxt_bpf.c +++ b/extensions/libxt_bpf.c @@ -22,6 +22,8 @@ #include <linux/bpf.h> #endif +#include <linux/unistd.h> + #define BCODE_FILE_MAX_LEN_B 1024 enum { |