diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-01-30 17:34:59 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-01-30 17:34:59 +0000 |
commit | 2ad85d8d97e961839ddcb838af1f52104af1d030 (patch) | |
tree | b34985d3486b1b1f122f1eb9004b267289652820 /usr.sbin/smtpd/smtpd.h | |
parent | ae280d1b5f9990fabe1466ff8e7f61df8f618db5 (diff) |
bump descriptors limit to the max and set the maximum connections count to
three quarters of that limit (a session typically has 3 descriptors). when
we hit that limit, we stop accepting connections, and when client closes a
session, we start accepting connections again. this prevents us from going
into a session that is likely to fail because of scarce resources.
idea discussed with jacekm@, code mostly ripped from relayd
Diffstat (limited to 'usr.sbin/smtpd/smtpd.h')
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index 60b50aa413d..2c6da0c217d 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.63 2009/01/30 16:37:52 gilles Exp $ */ +/* $OpenBSD: smtpd.h,v 1.64 2009/01/30 17:34:58 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -624,6 +624,7 @@ struct smtpd { #define SMTPD_SMTP_PAUSED 0x00000010 u_int32_t sc_flags; struct timeval sc_qintval; + u_int32_t sc_maxconn; struct event sc_ev; int sc_pipes[PROC_COUNT] [PROC_COUNT][2]; |