Module: kamailio
Branch: master
Commit: e3e6fd75bdd688acebf0ec8a1b7efa6fcada1de6
URL:
https://github.com/kamailio/kamailio/commit/e3e6fd75bdd688acebf0ec8a1b7efa6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-02-19T22:24:21+01:00
core: tcp - skip checking when tcp_accept_iplimit is 0
---
Modified: src/core/tcp_main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e3e6fd75bdd688acebf0ec8a1b7efa6…
Patch:
https://github.com/kamailio/kamailio/commit/e3e6fd75bdd688acebf0ec8a1b7efa6…
---
diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c
index 35034d1baa8..757329a8543 100644
--- a/src/core/tcp_main.c
+++ b/src/core/tcp_main.c
@@ -1169,6 +1169,10 @@ int tcp_connection_limit_srcip(union sockaddr_union *srcaddr, int
limit)
int n;
int i;
+ if(limit <= 0) {
+ return 0;
+ }
+
n = 0;
su2ip_addr(&src_ip, srcaddr);
TCPCONN_LOCK;