- Update to version 6974.
- Fix security vulnerability in the new icmp error handling code (does not affect FreeBSD since that code is Linux specific and was disabled) [1]. Reported by: Steve Crowder <steve@crowders.org> Security: http://www.r1ch.net/forum/index.php?topic=106.msg6601#msg6601 [1]
This commit is contained in:
parent
830dc339c8
commit
e977965241
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=182271
3 changed files with 28 additions and 24 deletions
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= r1q2
|
||||
PORTVERSION= 6964
|
||||
PORTVERSION= 6974
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= http://www.r1ch.net/stuff/r1q2/src/
|
||||
DISTNAME= ${PORTNAME}-b${PORTVERSION}-src
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
MD5 (r1q2-b6964-src.zip) = 926af18798f4e36c1bf75f94569c1d08
|
||||
SHA256 (r1q2-b6964-src.zip) = e4c2764dc07f38295c389c0ab60f362dc024934c667c6d4db03d55204908824c
|
||||
SIZE (r1q2-b6964-src.zip) = 1120296
|
||||
MD5 (r1q2-b6974-src.zip) = 05d208d9969098572aff8dc374a89c7c
|
||||
SHA256 (r1q2-b6974-src.zip) = 26ae12213779c028971b204b0594697c868d8cf0a758cd1aa8028b0db620fba7
|
||||
SIZE (r1q2-b6974-src.zip) = 1121829
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- linux/net_udp.c.orig Fri Dec 29 17:10:28 2006
|
||||
+++ linux/net_udp.c Fri Dec 29 17:11:42 2006
|
||||
--- linux/net_udp.c.orig Fri Jan 12 23:46:14 2007
|
||||
+++ linux/net_udp.c Fri Jan 12 23:59:49 2007
|
||||
@@ -13,8 +13,12 @@
|
||||
#include <sys/uio.h>
|
||||
#include <errno.h>
|
||||
|
@ -13,35 +13,39 @@
|
|||
|
||||
#ifdef NeXT
|
||||
#include <libc.h>
|
||||
@@ -191,6 +195,7 @@
|
||||
@@ -187,6 +191,7 @@
|
||||
|
||||
if (err == ECONNREFUSED)
|
||||
{
|
||||
if (ret == -1)
|
||||
{
|
||||
+#ifdef __linux__
|
||||
//linux makes this needlessly complex, couldn't just return the source of the error in from, oh no...
|
||||
struct probehdr rcvbuf;
|
||||
struct iovec iov;
|
||||
@@ -243,6 +248,11 @@
|
||||
//linux makes this needlessly complex, couldn't just return the source of the error in from, oh no...
|
||||
struct probehdr rcvbuf;
|
||||
struct iovec iov;
|
||||
@@ -308,9 +313,10 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
return 0;
|
||||
+#else
|
||||
+ SockadrToNetadr (&from, net_from);
|
||||
+ Com_Printf ("NET_GetPacket: %s from %s\n", LOG_NET, NET_ErrorString(), NET_AdrToString (net_from));
|
||||
+ return -1;
|
||||
+#endif
|
||||
}
|
||||
Com_Printf ("NET_GetPacket: %s\n", LOG_NET, NET_ErrorString());
|
||||
-
|
||||
- //errno = err;
|
||||
- //Com_Printf ("NET_GetPacket: %s\n", LOG_NET, NET_ErrorString());
|
||||
+#else
|
||||
+ errno = err;
|
||||
+ Com_Printf ("NET_GetPacket: %s\n", LOG_NET, NET_ErrorString());
|
||||
+#endif
|
||||
return 0;
|
||||
@@ -359,11 +369,13 @@
|
||||
}
|
||||
|
||||
@@ -426,6 +432,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#ifdef __linux__
|
||||
// r1: accept icmp unreachables for quick disconnects
|
||||
if (setsockopt (newsocket, IPPROTO_IP, IP_RECVERR, (char *)&i, sizeof(i)) == -1)
|
||||
if (!net_no_recverr->intvalue)
|
||||
{
|
||||
Com_Printf ("UDP_OpenSocket: Couldn't set IP_RECVERR: %s\n", LOG_NET, NET_ErrorString());
|
||||
@@ -434,6 +441,7 @@
|
||||
Com_Printf ("UDP_OpenSocket: Couldn't set IP_RECVERR: %s\n", LOG_NET, NET_ErrorString());
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue