mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ipv4, bpf: Introduced to support the ULP to modify sockets during setopt
@ 2025-01-21  8:05 zhangmingyi
  2025-01-23 21:14 ` Daniel Borkmann
  0 siblings, 1 reply; 3+ messages in thread
From: zhangmingyi @ 2025-01-21  8:05 UTC (permalink / raw)
  To: ast, daniel, andrii, martin.lau, song, yhs, john.fastabend,
	kpsingh, sdf, haoluo, jolsa
  Cc: bpf, linux-kernel, yanan, wuchangye, xiesongyang, liuxin350,
	liwei883, tianmuyang, zhangmingyi5

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 <zhangmingyi5@huawei.com>
---
 net/core/filter.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/core/filter.c b/net/core/filter.c
index 713d6f454df3..f23d3f87e690 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -5383,6 +5383,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;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-26  3:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-21  8:05 [PATCH] ipv4, bpf: Introduced to support the ULP to modify sockets during setopt zhangmingyi
2025-01-23 21:14 ` Daniel Borkmann
2025-01-26  3:36   ` zhangmingyi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®