diff options
author | Lorenz Bauer <lmb@cloudflare.com> | 2020-03-09 11:12:38 +0000 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-03-09 22:34:58 +0100 |
commit | edc6741cc66059532ba621928e3f1b02a53a2f39 (patch) | |
tree | cefa40db3ea5e03a027f2ab6e0299f8e80c6a159 /include/net | |
parent | cb21802b39632ba1fa9b31ea134d2079a47600ef (diff) | |
download | linux-stable-edc6741cc66059532ba621928e3f1b02a53a2f39.tar.gz linux-stable-edc6741cc66059532ba621928e3f1b02a53a2f39.tar.bz2 linux-stable-edc6741cc66059532ba621928e3f1b02a53a2f39.zip |
bpf: Add sockmap hooks for UDP sockets
Add basic psock hooks for UDP sockets. This allows adding and
removing sockets, as well as automatic removal on unhash and close.
Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200309111243.6982-8-lmb@cloudflare.com
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/udp.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/udp.h b/include/net/udp.h index e55d5f765807..a8fa6c0c6ded 100644 --- a/include/net/udp.h +++ b/include/net/udp.h @@ -503,4 +503,9 @@ static inline struct sk_buff *udp_rcv_segment(struct sock *sk, return segs; } +#ifdef CONFIG_BPF_STREAM_PARSER +struct sk_psock; +struct proto *udp_bpf_get_proto(struct sock *sk, struct sk_psock *psock); +#endif /* BPF_STREAM_PARSER */ + #endif /* _UDP_H */ |