summaryrefslogtreecommitdiff
path: root/accel-pptpd/ctrl/pptp.c
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-09-27 20:07:32 +0400
committerKozlov Dmitry <dima@server>2010-09-27 20:07:32 +0400
commit0325cc5f07ac992414129b4f47ae4aae017dbd2b (patch)
tree52c6d762dd62b347695aa51ab5cf4944e5f7bd9b /accel-pptpd/ctrl/pptp.c
parent59d9616d73973c529b08578f3596acaa081cd8bf (diff)
downloadaccel-ppp-xebd-0325cc5f07ac992414129b4f47ae4aae017dbd2b.tar.gz
accel-ppp-xebd-0325cc5f07ac992414129b4f47ae4aae017dbd2b.zip
bug fixes
Diffstat (limited to 'accel-pptpd/ctrl/pptp.c')
-rw-r--r--accel-pptpd/ctrl/pptp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/accel-pptpd/ctrl/pptp.c b/accel-pptpd/ctrl/pptp.c
index 4c27610..fddd00f 100644
--- a/accel-pptpd/ctrl/pptp.c
+++ b/accel-pptpd/ctrl/pptp.c
@@ -580,6 +580,8 @@ static void __init pptp_init(void)
addr.sin_family = AF_INET;
addr.sin_port = htons (PPTP_PORT);
addr.sin_addr.s_addr = htonl (INADDR_ANY);
+
+ setsockopt(serv.hnd.fd, SOL_SOCKET, SO_REUSEADDR, &serv.hnd.fd, 4);
if (bind (serv.hnd.fd, (struct sockaddr *) &addr, sizeof (addr)) < 0) {
log_emerg("pptp: failed to bind socket: %s\n", strerror(errno));
close(serv.hnd.fd);