CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_11_06
Commit time: 2003-11-22 13:07:26 UTC
Modified files:
Tag: u2_10_11_06
ChangeLog ircd/ircd_features.c ircd/os_bsd.c ircd/os_generic.c
ircd/os_linux.c ircd/os_openbsd.c ircd/os_solaris.c
Log message:
Author: Isomer <[EMAIL PROTECTED]>
Log message:
By default disable changing of window sizes, let the OS choose them, it's
probably smarter than we are nowdays.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.290.2.129.2.19 ircu2.10/ChangeLog:1.290.2.129.2.20
--- ircu2.10/ChangeLog:1.290.2.129.2.19 Sat Nov 22 04:55:56 2003
+++ ircu2.10/ChangeLog Sat Nov 22 05:07:16 2003
@@ -1,3 +1,8 @@
+2003-11-23 Isomer <[EMAIL PROTECTED]>
+ * ircd/os_*.c, ircd/ircd_features.c: Default changing window sizes
+ to off. if an admin is smart enough to understand these features
+ they can enable them manually.
+
2003-11-23 Spike <[EMAIL PROTECTED]>
* ircd/IPcheck.c: Make IPcheck constants configurable
Index: ircu2.10/ircd/ircd_features.c
diff -u ircu2.10/ircd/ircd_features.c:1.15.2.12.2.2
ircu2.10/ircd/ircd_features.c:1.15.2.12.2.3
--- ircu2.10/ircd/ircd_features.c:1.15.2.12.2.2 Sat Nov 22 04:55:57 2003
+++ ircu2.10/ircd/ircd_features.c Sat Nov 22 05:07:16 2003
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: ircd_features.c,v 1.15.2.12.2.2 2003/11/22 12:55:57 isomer Exp $
+ * $Id: ircd_features.c,v 1.15.2.12.2.3 2003/11/22 13:07:16 isomer Exp $
*/
#include "config.h"
@@ -272,8 +272,8 @@
F_I(CONNECTFREQUENCY, 0, 600, init_class),
F_I(DEFAULTMAXSENDQLENGTH, 0, 40000, init_class),
F_I(GLINEMAXUSERCOUNT, 0, 20, 0),
- F_I(SOCKSENDBUF, 0, 61440, 0),
- F_I(SOCKRECVBUF, 0, 61440, 0),
+ F_I(SOCKSENDBUF, 0, 0, 0),
+ F_I(SOCKRECVBUF, 0, 0, 0),
F_I(IPCHECK_CLONE_LIMIT, 0, 4, 0),
F_I(IPCHECK_CLONE_PERIOD, 0, 40, 0),
F_I(IPCHECK_CLONE_DELAY, 0, 600, 0),
Index: ircu2.10/ircd/os_bsd.c
diff -u ircu2.10/ircd/os_bsd.c:1.11.2.1 ircu2.10/ircd/os_bsd.c:1.11.2.1.2.1
--- ircu2.10/ircd/os_bsd.c:1.11.2.1 Sat Nov 1 02:19:12 2003
+++ ircu2.10/ircd/os_bsd.c Sat Nov 22 05:07:16 2003
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: os_bsd.c,v 1.11.2.1 2003/11/01 10:19:12 isomer Exp $
+ * $Id: os_bsd.c,v 1.11.2.1.2.1 2003/11/22 13:07:16 isomer Exp $
*
*/
#include "config.h"
@@ -213,11 +213,12 @@
{
unsigned int sopt = ssize;
unsigned int ropt = rsize;
- return (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
- (const char*) &ropt, sizeof(ropt)) &&
- 0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF,
- (const char*) &sopt, sizeof(sopt)));
+ return (((0 == rsize) || (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
+ (const char*) &ropt, sizeof(ropt)))) &&
+ ((0 == ssize) || (0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF,
+ (const char*) &sopt, sizeof(sopt)))));
}
+
int os_set_tos(int fd,int tos)
{
Index: ircu2.10/ircd/os_generic.c
diff -u ircu2.10/ircd/os_generic.c:1.9.2.1 ircu2.10/ircd/os_generic.c:1.9.2.1.2.1
--- ircu2.10/ircd/os_generic.c:1.9.2.1 Sat Nov 1 02:19:12 2003
+++ ircu2.10/ircd/os_generic.c Sat Nov 22 05:07:16 2003
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: os_generic.c,v 1.9.2.1 2003/11/01 10:19:12 isomer Exp $
+ * $Id: os_generic.c,v 1.9.2.1.2.1 2003/11/22 13:07:16 isomer Exp $
*
*/
#include "config.h"
@@ -215,10 +215,10 @@
{
unsigned int sopt = ssize;
unsigned int ropt = rsize;
- return (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
- (const char*) &ropt, sizeof(ropt)) &&
- 0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF,
- (const char*) &sopt, sizeof(sopt)));
+ return ((0 == rsize) || (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
+ (const char*) &ropt, sizeof(ropt))) &&
+ ((0 == ssize) || (0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF,
+ (const char*) &sopt, sizeof(sopt)))));
}
int os_set_tos(int fd,int tos)
Index: ircu2.10/ircd/os_linux.c
diff -u ircu2.10/ircd/os_linux.c:1.9.2.1.2.1 ircu2.10/ircd/os_linux.c:1.9.2.1.2.2
--- ircu2.10/ircd/os_linux.c:1.9.2.1.2.1 Tue Nov 18 02:09:45 2003
+++ ircu2.10/ircd/os_linux.c Sat Nov 22 05:07:16 2003
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: os_linux.c,v 1.9.2.1.2.1 2003/11/18 10:09:45 isomer Exp $
+ * $Id: os_linux.c,v 1.9.2.1.2.2 2003/11/22 13:07:16 isomer Exp $
*
*/
#include "config.h"
@@ -154,9 +154,12 @@
{
unsigned int sopt = ssize;
unsigned int ropt = rsize;
- return (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &ropt, sizeof(ropt)) &&
- 0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sopt, sizeof(sopt)));
+ return (((0 == rsize) || (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
+ (const char*) &ropt, sizeof(ropt)))) &&
+ ((0 == ssize) || (0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF,
+ (const char*) &sopt, sizeof(sopt)))));
}
+
int os_set_tos(int fd,int tos)
{
Index: ircu2.10/ircd/os_openbsd.c
diff -u ircu2.10/ircd/os_openbsd.c:1.4.2.1 ircu2.10/ircd/os_openbsd.c:1.4.2.1.2.1
--- ircu2.10/ircd/os_openbsd.c:1.4.2.1 Sat Nov 1 02:19:12 2003
+++ ircu2.10/ircd/os_openbsd.c Sat Nov 22 05:07:16 2003
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: os_openbsd.c,v 1.4.2.1 2003/11/01 10:19:12 isomer Exp $
+ * $Id: os_openbsd.c,v 1.4.2.1.2.1 2003/11/22 13:07:16 isomer Exp $
*
*/
#include "config.h"
@@ -220,10 +220,10 @@
{
unsigned int sopt = ssize;
unsigned int ropt = rsize;
- return (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
- (const char*) &ropt, sizeof(ropt)) &&
- 0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF,
- (const char*) &sopt, sizeof(sopt)));
+ return (((0 == rsize) || (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
+ (const char*) &ropt, sizeof(ropt)))) &&
+ ((0 == ssize) || (0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF,
+ (const char*) &sopt, sizeof(sopt)))));
}
int os_set_tos(int fd,int tos)
Index: ircu2.10/ircd/os_solaris.c
diff -u ircu2.10/ircd/os_solaris.c:1.9.2.1 ircu2.10/ircd/os_solaris.c:1.9.2.1.2.1
--- ircu2.10/ircd/os_solaris.c:1.9.2.1 Sat Nov 1 02:19:12 2003
+++ ircu2.10/ircd/os_solaris.c Sat Nov 22 05:07:16 2003
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: os_solaris.c,v 1.9.2.1 2003/11/01 10:19:12 isomer Exp $
+ * $Id: os_solaris.c,v 1.9.2.1.2.1 2003/11/22 13:07:16 isomer Exp $
*
*/
#include "config.h"
@@ -129,10 +129,10 @@
{
unsigned int sopt = ssize;
unsigned int ropt = rsize;
- return (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
- (const char*) &ropt, sizeof(ropt)) &&
- 0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF,
- (const char*) &sopt, sizeof(sopt)));
+ return (((0 == rsize) || (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
+ (const char*) &ropt, sizeof(ropt)))) &&
+ ((0 == ssize) || (0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF,
+ (const char*) &sopt, sizeof(sopt)))));
}
int os_set_tos(int fd,int tos)
----------------------- End of diff -----------------------