Probably the developer thought only one of the tables are used in a Kamailio 
instance, they kind of overlap a lot in purpose and functionality. Personally I 
use only address table, I don't think I ever initiated a Kamailio deployment 
using the trusted table.

Anyhow, because this kind of functionality seems to be needed in other places, 
I added support in core for rate-limiting the execution of RPC commands to 
specific time interval that can be set via the new core parameter 
`rpc_exec_delta`. It is not done automatically for all commands, only for those 
that are exported with `RPC_EXEC_DELTA` flag in the C code. For now I updated 
the exports of RPC reload commands for `tls` and `permissions` module.

The core value is checked first, being done when the rpc command is searched to 
be executed, so if it is lower than per module restriction (like in 
permissions), it hits first.

The rate limiting is per command, but the time interval value is global, which 
should be (good) enough for now, imo. If more flexibility would be needed, one 
more thing that can be added is to make `rpc_exec_delta` updatable via rpc as 
well.

The new functionality is available only in devel version, it is not a candidate 
to be backported because it touches many places.

Testing and feedback is appreciated. I think this issue can be closed if no 
other comments/proposals come in soon.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3318#issuecomment-1372271452
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/issues/3318/1372271...@github.com>
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to