As a hotfix we used options
```
tcp_source_ipv4 = IPv4 address
tcp_source_ipv6 = IPv6 address
```
https://www.kamailio.org/wiki/cookbooks/5.4.x/core#tcp_source_ipv4_tcp_sour…
This works if all Kamailio sockets are bound to one IP.
To get it working for multiple IPs we try to make such a change
```diff
diff --git a/src/main.c b/src/main.c
index 4ee5afe9d0..3670a8e826 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1600,6 +1601,7 @@ int main_loop(void)
(sendipv6_tcp->flags&(SI_IS_LO|SI_IS_MCAST))) &&
(si->address.af==AF_INET6))
sendipv6_tcp=si;
+ tcp_set_src_addr(&si->address);
}
/* the number of sockets does not matter */
cfg_register_child(tcp_children_no + 1 /* tcp main */);
--
```
Also, a similar change is required for UDP transport.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3486#issuecomment-1598649522
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3486/1598649522(a)github.com>