From 9ddcab6d798c303e599299f25b55820d74d4490d Mon Sep 17 00:00:00 2001 From: Menglong Dong Date: Tue, 19 Jul 2022 11:05:10 +0800 Subject: [PATCH] net: bpf: fix compile error in bpf_redirect_peer helper Some error happens while compiling bpf_redirect_peer helper, which may be caused during code backport. Fix it by add the missing BPF_F_PEER. Signed-off-by: Menglong Dong --- net/core/filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/core/filter.c b/net/core/filter.c index bbc30aa93..dd23281b6 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -2361,7 +2361,8 @@ out: /* Internal, non-exposed redirect flags. */ enum { - BPF_F_NEIGH = (1ULL << 1), + BPF_F_NEIGH = (1ULL << 1), + BPF_F_PEER = (1ULL << 2), BPF_F_NEXTHOP = (1ULL << 3), #define BPF_F_REDIRECT_INTERNAL (BPF_F_NEIGH | BPF_F_PEER | BPF_F_NEXTHOP) };