SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,21 @@
Index: src/PerfSocket.cpp
--- src/PerfSocket.cpp.orig
+++ src/PerfSocket.cpp
@@ -118,8 +118,8 @@ void SetSocketOptions( thread_Settings *inSettings ) {
}
if (inSettings->mTTL > 0) {
// set TTL
- int val = inSettings->mTTL;
if ( !isIPV6(inSettings) ) {
+ u_int8_t val = inSettings->mTTL;
int rc = setsockopt( inSettings->mSock, IPPROTO_IP, IP_MULTICAST_TTL,
(char*) &val, (Socklen_t) sizeof(val));
@@ -127,6 +127,7 @@ void SetSocketOptions( thread_Settings *inSettings ) {
} else
# ifdef HAVE_IPV6_MULTICAST
{
+ int val = inSettings->mTTL;
int rc = setsockopt( inSettings->mSock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
(char*) &val, (Socklen_t) sizeof(val));
WARN_errno( rc == SOCKET_ERROR, "multicast v6 ttl" );