freebsd-ports/net/ocserv/files/patch-src_main.c
Juraj Lutter 944e00e9f4 net/ocserv: Update to 1.2.0
- Update to 1.2.0
- Adjust dependencies
- Make DTLS work
- Regen patches

Co-authored-by:	Eugene Mitrofanov <emitrofanov@gmail.com>
2023-08-21 15:08:57 +02:00

25 lines
781 B
C

--- src/main.c.orig 2023-06-16 17:01:03 UTC
+++ src/main.c
@@ -215,9 +215,9 @@ int _listen_ports(void *pool, struct perm_cfg_st* conf
#endif
y = 1;
- if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
+ if (setsockopt(s, SOL_SOCKET, SO_REUSEPORT,
(const void *) &y, sizeof(y)) < 0) {
- perror("setsockopt(SO_REUSEADDR) failed");
+ perror("setsockopt(SO_REUSEPORT) failed");
}
if (ptr->ai_socktype == SOCK_DGRAM) {
@@ -424,8 +424,8 @@ int y;
#endif
y = 1;
- if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const void *) &y, sizeof(y)) < 0) {
- perror("setsockopt(SO_REUSEADDR) failed");
+ if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, (const void *) &y, sizeof(y)) < 0) {
+ perror("setsockopt(SO_REUSEPORT) failed");
}
if (GETCONFIG(s)->try_mtu) {