summaryrefslogtreecommitdiffstats
path: root/src/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/socket.c b/src/socket.c
index 526e63f..4f5ac0f 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -69,6 +69,11 @@ static int bind_socket(fastd_context_t *ctx, const fastd_bind_address_t *addr, b
}
#endif
+#ifdef USE_FREEBIND
+ if (setsockopt(fd, IPPROTO_IP, IP_FREEBIND, &one, sizeof(one)))
+ pr_warn_errno(ctx, "setsockopt: unable to set IP_FREEBIND");
+#endif
+
if (af == AF_INET6) {
if (setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &one, sizeof(one))) {
pr_error_errno(ctx, "setsockopt: unable to set IPV6_RECVPKTINFO");