opnsense-ports/net/ocserv/files/patch-src_main.c
Franco Fichtner 69b48d3f1e */*: sync with upstream
Taken from: FreeBSD
2015-09-10 05:23:56 +02:00

14 lines
462 B
C

--- src/main.c.orig 2015-08-31 19:19:45 UTC
+++ src/main.c
@@ -135,8 +135,9 @@ int y;
#elif defined(IP_RECVDSTADDR) /* *BSD */
if (family == AF_INET) {
y = 1;
- if (setsockopt(fd, IPPROTO_IP, IP_RECVDSTADDR,
- (const void *)&y, sizeof(y)) < 0)
+ if (family == AF_INET &&
+ setsockopt(fd, IPPROTO_IP, IP_RECVDSTADDR,
+ (const void *)&y, sizeof(y)) < 0)
perror("setsockopt(IP_RECVDSTADDR) failed");
}
#endif