aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/af_unix.h
diff options
context:
space:
mode:
authorCong Wang <cong.wang@bytedance.com>2021-07-04 12:02:48 -0700
committerAlexei Starovoitov <ast@kernel.org>2021-07-15 18:17:50 -0700
commit9825d866ce0d11009513e06824885340062c166b (patch)
treeb292e6c74103ad9864d772d76d7f74ddcb06ef81 /include/net/af_unix.h
parentaf_unix: Implement ->psock_update_sk_prot() (diff)
downloadwireguard-linux-9825d866ce0d11009513e06824885340062c166b.tar.xz
wireguard-linux-9825d866ce0d11009513e06824885340062c166b.zip
af_unix: Implement unix_dgram_bpf_recvmsg()
We have to implement unix_dgram_bpf_recvmsg() to replace the original ->recvmsg() to retrieve skmsg from ingress_msg. AF_UNIX is again special here because the lack of sk_prot->recvmsg(). I simply add a special case inside unix_dgram_recvmsg() to call sk->sk_prot->recvmsg() directly. Signed-off-by: Cong Wang <cong.wang@bytedance.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210704190252.11866-8-xiyou.wangcong@gmail.com
Diffstat (limited to 'include/net/af_unix.h')
-rw-r--r--include/net/af_unix.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index cca645846af1..435a2c3d5a6f 100644
--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -82,6 +82,8 @@ static inline struct unix_sock *unix_sk(const struct sock *sk)
long unix_inq_len(struct sock *sk);
long unix_outq_len(struct sock *sk);
+int __unix_dgram_recvmsg(struct sock *sk, struct msghdr *msg, size_t size,
+ int flags);
#ifdef CONFIG_SYSCTL
int unix_sysctl_register(struct net *net);
void unix_sysctl_unregister(struct net *net);