[PATCH] ipv4, bpf: Introduced to support the ULP to get or set sockets

zhangmingyi posted 1 patch 11 months ago
There is a newer version of this series
net/core/filter.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] ipv4, bpf: Introduced to support the ULP to get or set sockets
Posted by zhangmingyi 11 months ago
Note that do_tcp_getsockopt and do_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 <zhangmingyi5@huawei.com>
---
 net/core/filter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/core/filter.c b/net/core/filter.c
index 713d6f454df3..bdb5c43d6fb0 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -5380,6 +5380,7 @@ static int sol_tcp_sockopt(struct sock *sk, int optname,
 	case TCP_CONGESTION:
 		return sol_tcp_sockopt_congestion(sk, optval, optlen, getopt);
 	case TCP_SAVED_SYN:
+	case TCP_ULP:
 		if (*optlen < 1)
 			return -EINVAL;
 		break;
-- 
2.43.0