diff options
author | Cong Wang <cong.wang@bytedance.com> | 2021-07-04 21:02:48 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-07-16 03:17:50 +0200 |
commit | 9825d866ce0d11009513e06824885340062c166b (patch) | |
tree | b292e6c74103ad9864d772d76d7f74ddcb06ef81 /include/net/af_unix.h | |
parent | af_unix: Implement ->psock_update_sk_prot() (diff) | |
download | linux-9825d866ce0d11009513e06824885340062c166b.tar.xz 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.h | 2 |
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); |