Displaying 1 result from an estimated 1 matches for "set_socket_nonblock".
2010 Mar 04
1
Making tftpd (hpa) firewall frienldy
...makes tftp reply back with
same port is listening on )
tftpd --port-range 69:69 -4 -s /tftpboot/
--- tftp-hpa-0.49/tftpd/tftpd.c 2008-10-21 01:08:31.000000000 +0300
+++ tftp-hpa-0.49-tftpd-reuseport.c 2010-03-03 15:19:26.000000000 +0200
@@ -524,6 +524,11 @@
#ifndef __CYGWIN__
set_socket_nonblock(fd4, 1);
#endif
+ { int x = 1; setsockopt (fd4, SOL_SOCKET, SO_REUSEADDR, &x, sizeof (x));
}
+#ifdef SO_REUSEPORT
+ { int x = 1; setsockopt (fd4, SOL_SOCKET, SO_REUSEPORT , &x, sizeof
(x)); }
+#endif
+
memset(&bindaddr4, 0, sizeof bindaddr4);
bindaddr4.sin...