Message ID | 20220104013153.97906-3-kuniyu@amazon.co.jp (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | BPF |
Headers | show |
Series | bpf: Batching iter for AF_UNIX sockets. | expand |
diff --git a/net/core/filter.c b/net/core/filter.c index 368fe28c8dc6..cac2be559ab0 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -4969,6 +4969,12 @@ static int _bpf_getsockopt(struct sock *sk, int level, int optname, goto err_clear; switch (optname) { + case SO_RCVBUF: + *((int *)optval) = sk->sk_rcvbuf; + break; + case SO_SNDBUF: + *((int *)optval) = sk->sk_sndbuf; + break; case SO_MARK: *((int *)optval) = sk->sk_mark; break;
This patch exposes SO_RCVBUF/SO_SNDBUF through bpf_getsockopt(). Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp> --- net/core/filter.c | 6 ++++++ 1 file changed, 6 insertions(+)