summaryrefslogtreecommitdiff
path: root/accel-pppd/ipv6
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2012-04-29 22:49:00 +0400
committerKozlov Dmitry <xeb@mail.ru>2012-04-29 22:49:00 +0400
commitefdff96653311924ac3241ec4acb4609e1d36e19 (patch)
tree341a940ba2fc51425d7a9f626ff2d8c0da40c528 /accel-pppd/ipv6
parentc2e4bab51f6152c3b4cb6481c93be533c0403e12 (diff)
downloadaccel-ppp-efdff96653311924ac3241ec4acb4609e1d36e19.tar.gz
accel-ppp-efdff96653311924ac3241ec4acb4609e1d36e19.zip
dhcpv6: make SO_REUSEADDR
Diffstat (limited to 'accel-pppd/ipv6')
-rw-r--r--accel-pppd/ipv6/dhcpv6.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/accel-pppd/ipv6/dhcpv6.c b/accel-pppd/ipv6/dhcpv6.c
index e6df7dea..ddc977ba 100644
--- a/accel-pppd/ipv6/dhcpv6.c
+++ b/accel-pppd/ipv6/dhcpv6.c
@@ -953,6 +953,7 @@ static void init(void)
{
struct sockaddr_in6 addr;
int sock;
+ int f = 1;
if (!triton_module_loaded("ipv6_nd"))
log_warn("dhcpv6: ipv6_nd module is not loaded, you probably get misconfigured network environment\n");
@@ -966,6 +967,7 @@ static void init(void)
}
fcntl(sock, F_SETFD, fcntl(sock, F_GETFD) | FD_CLOEXEC);
+ setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &f, sizeof(f));
memset(&addr, 0, sizeof(addr));
addr.sin6_family = AF_INET6;