Skip to content

Commit

Permalink
ipv4, bpf: Introduced to support the ULP to modify sockets during setopt
Browse files Browse the repository at this point in the history
Note that tcp_getsockopt and tcp_setsockopt support TCP_ULP, while
bpf_getsockopt and bpf_setsockopt do not support TCP_ULP.
I think we can add the handling of this case.

Signed-off-by: zhangmingyi <[email protected]>
  • Loading branch information
zhangmingyi authored and Kernel Patches Daemon committed Jan 23, 2025
1 parent 1fb8a7e commit 6aa2961
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/core/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -5391,6 +5391,10 @@ static int sol_tcp_sockopt(struct sock *sk, int optname,
if (*optlen < 1)
return -EINVAL;
break;
case TCP_ULP:
if (getopt)
return -EINVAL;
break;
case TCP_BPF_SOCK_OPS_CB_FLAGS:
if (*optlen != sizeof(int))
return -EINVAL;
Expand Down

0 comments on commit 6aa2961

Please sign in to comment.