diff options
author | Martin KaFai Lau <martin.lau@kernel.org> | 2022-09-01 17:29:25 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-09-02 20:34:32 -0700 |
commit | fd969f25fe24be515278d28cbf86dde39be8a495 (patch) | |
tree | fba3baa39a31da418f7bdecbf2cf7ced787495ec /include/net/ip.h | |
parent | 273b7f0fb44847c41814a59901977be284daa447 (diff) | |
download | lwn-fd969f25fe24be515278d28cbf86dde39be8a495.tar.gz lwn-fd969f25fe24be515278d28cbf86dde39be8a495.zip |
bpf: Change bpf_getsockopt(SOL_IP) to reuse do_ip_getsockopt()
This patch changes bpf_getsockopt(SOL_IP) to reuse
do_ip_getsockopt() and remove the duplicated code.
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20220902002925.2895416-1-kafai@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 34fa5b0f0a0e..038097c2a152 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -747,6 +747,8 @@ int do_ip_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, unsigned int optlen); int ip_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, unsigned int optlen); +int do_ip_getsockopt(struct sock *sk, int level, int optname, + sockptr_t optval, sockptr_t optlen); int ip_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen); int ip_ra_control(struct sock *sk, unsigned char on, |