From 308ca9936a1f9511515d016f5380ddba7de68160 Mon Sep 17 00:00:00 2001 From: WPMGPRoSToTeMa Date: Tue, 12 Jan 2016 18:47:37 +0300 Subject: [PATCH] NET_IPSocket: Disabled adding DF flag on some linux --- rehlds/engine/net_ws.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rehlds/engine/net_ws.cpp b/rehlds/engine/net_ws.cpp index 4532c9c..5fcdbe1 100644 --- a/rehlds/engine/net_ws.cpp +++ b/rehlds/engine/net_ws.cpp @@ -1637,6 +1637,16 @@ int NET_IPSocket(char *net_interface, int port, qboolean multicast) #endif // _WIN32 Con_DPrintf("WARNING: UDP_OpenSocket: port %d setsockopt IP_MULTICAST_LOOP: %s\n", port, NET_ErrorString(err)); } + +#if defined __linux__ && defined REHLDS_FIXES + i = IP_PMTUDISC_DONT; + if (setsockopt(newsocket, IPPROTO_IP, IP_MTU_DISCOVER, (char *)&i, sizeof(i)) == SOCKET_ERROR) + { + err = errno; + Con_Printf("WARNING: UDP_OpenSocket: port %d setsockopt IP_MTU_DISCOVER: %s\n", port, NET_ErrorString(err)); + } +#endif + return newsocket; }