Module: kamailio
Branch: 5.7
Commit: f8fa74e7b2901ecae8bbb851250d8b28452b18da
URL:
https://github.com/kamailio/kamailio/commit/f8fa74e7b2901ecae8bbb851250d8b2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-06-13T10:53:36+02:00
core: tcp - change log levels for failing to set source for tcp connections
- it is not possible always and it can fill the logs
(cherry picked from commit 15403a543d83e337ee578ad37dc1d84316e4cf16)
(cherry picked from commit 8a027b99cf8dc4f7e889aa7644f1f7699c7cb08e)
---
Modified: src/core/tcp_main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f8fa74e7b2901ecae8bbb851250d8b2…
Patch:
https://github.com/kamailio/kamailio/commit/f8fa74e7b2901ecae8bbb851250d8b2…
---
diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c
index 955eb4b6e19..593f1a3be57 100644
--- a/src/core/tcp_main.c
+++ b/src/core/tcp_main.c
@@ -1284,7 +1284,7 @@ inline static int find_listening_sock_info(
if(setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (void *)&optval,
sizeof(optval))
== -1) {
- LM_ERR("setsockopt SO_REUSEADDR %s\n", strerror(errno));
+ LM_NOTICE("setsockopt SO_REUSEADDR [%s]\n", strerror(errno));
/* continue, not critical */
}
#endif
@@ -1293,19 +1293,19 @@ inline static int find_listening_sock_info(
if(setsockopt(s, SOL_SOCKET, SO_REUSEPORT, (void *)&optval,
sizeof(optval))
== -1) {
- LM_ERR("setsockopt SO_REUSEPORT %s\n", strerror(errno));
+ LM_NOTICE("setsockopt SO_REUSEPORT [%s]\n", strerror(errno));
/* continue, not critical */
}
#endif
if(unlikely(bind(s, &si->su.s, sockaddru_len(si->su)) != 0)) {
- LM_WARN("binding to source address %s failed: %s [%d]\n",
+ LM_DBG("binding to source address %s failed: [%s] [%d]\n",
su2a(&si->su, sizeof(si->su)), strerror(errno), errno);
return -1;
}
}
} else {
if(unlikely(bind(s, &(*from)->s, sockaddru_len(**from)) != 0)) {
- LM_WARN("binding to source address %s failed: %s [%d]\n",
+ LM_DBG("binding to source address %s failed: [%s] [%d]\n",
su2a(&si->su, sizeof(si->su)), strerror(errno), errno);
return -1;
}