Module: kamailio
Branch: master
Commit: 3a9fd55427cf7419587ec087f61f0ef6cbc60f2d
URL:
https://github.com/kamailio/kamailio/commit/3a9fd55427cf7419587ec087f61f0ef…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-04-29T17:27:40+02:00
core: tcp - set the scope of IPv6 interface if bind_ipv6_link_local is set
---
Modified: src/core/tcp_main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3a9fd55427cf7419587ec087f61f0ef…
Patch:
https://github.com/kamailio/kamailio/commit/3a9fd55427cf7419587ec087f61f0ef…
---
diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c
index 85e06e9513..54288e908f 100644
--- a/src/core/tcp_main.c
+++ b/src/core/tcp_main.c
@@ -3041,6 +3041,11 @@ int tcp_init(struct socket_info* sock_info)
LM_WARN("setsockopt v6 tos: %s (%d)\n", strerror(errno), tos);
/* continue since this is not critical */
}
+ if(sr_bind_ipv6_link_local!=0) {
+ LM_INFO("setting scope of %s\n", sock_info->address_str.s);
+ addr->sin6.sin6_scope_id =
+ ipv6_get_netif_scope(sock_info->address_str.s);
+ }
}
#if defined(IP_FREEBIND)