Open vladimirkus opened 5 months ago
update: I tried fieldFilter
, but it doesn't work. Possibly because of args
being an array, or I just use wrong syntax.
we have removed source port from the event and after that ratelimit is working as expected to remove source port just comment out following line from bpf/process/types/sock.h
proberead(&event->tuple.sport, sizeof(event->tuple.sport), (&common->skc_num));
however there should be a simple way to remove source port from the events (fieldFilters ?)
What happened?
I'm trying to use rateLimit on tpc_connect calls, example:
I wrote a small python program that opens and closes sockets:
And when I run it, I observed that rateLimit didn't really drop events. I checked events' args:
So, I noticed that source port
sport
is probably the thing here, as it's chosen randomly per each opened socket. Cookie also doesn't repeat.Question: is there any way of using rateLimit on tcp_connect? Probably fieldFilter might help?
Tetragon Version
v1.1.0
Kernel Version
5.15.60
Kubernetes Version
v1.24.16
Bugtool
No response
Relevant log output
No response
Anything else?
No response