diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-06 12:31:51 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-06 12:31:51 +0200 |
commit | 4ab823eb500a8a63061eb23581e73ff9d8bffce1 (patch) | |
tree | f8685321c376eac9ba1f9fdd12f1586877ca6d9f /src/socket.c | |
parent | 04842eebd01dbcb0852166993c2a44ebc5ac96b1 (diff) | |
download | fastd-4ab823eb500a8a63061eb23581e73ff9d8bffce1.tar fastd-4ab823eb500a8a63061eb23581e73ff9d8bffce1.zip |
Set IP_FREEBIND
Diffstat (limited to 'src/socket.c')
-rw-r--r-- | src/socket.c | 5 |
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"); |