summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2008-12-26 10:28:32 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2008-12-26 10:28:32 +0000
commit5b035962a1b9d0cd936ff49be91cca1c76e8b02a (patch)
treea750f312df56b70cf6c6c45f79f2768caebaa41c /usr.sbin
parentc7304fafd435d5148cc4fec5a6ed0daba98bc955 (diff)
parse.y doesn't allow listen backlog configuration, so "bzero default" is used.
Hardcode it instead: 5 is a popular choice across the tree; ok gilles@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/smtp.c4
-rw-r--r--usr.sbin/smtpd/smtpd.h6
2 files changed, 4 insertions, 6 deletions
diff --git a/usr.sbin/smtpd/smtp.c b/usr.sbin/smtpd/smtp.c
index 832a2678e27..3ffb8544124 100644
--- a/usr.sbin/smtpd/smtp.c
+++ b/usr.sbin/smtpd/smtp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp.c,v 1.12 2008/12/22 13:18:58 jacekm Exp $ */
+/* $OpenBSD: smtp.c,v 1.13 2008/12/26 10:28:31 jacekm Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -529,7 +529,7 @@ smtp_setup_events(struct smtpd *env)
l, (l->flags & F_SSL)?" (with ssl)":"");
session_socket_blockmode(l->fd, BM_NONBLOCK);
- if (listen(l->fd, l->backlog) == -1)
+ if (listen(l->fd, SMTPD_BACKLOG) == -1)
fatal("listen");
l->env = env;
event_set(&l->ev, l->fd, EV_READ, smtp_accept, l);
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index f6fd4ef357a..3bf1347fd49 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.34 2008/12/21 02:18:46 gilles Exp $ */
+/* $OpenBSD: smtpd.h,v 1.35 2008/12/26 10:28:31 jacekm Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -40,8 +40,7 @@
#define SMTPD_SOCKET "/var/run/smtpd.sock"
#define SMTPD_BANNER "220 %s OpenSMTPD"
#define SMTPD_SESSION_TIMEOUT 300
-
-#define RCPTBUFSZ 256
+#define SMTPD_BACKLOG 5
#define DIRHASH_BUCKETS 4096
@@ -530,7 +529,6 @@ struct listener {
int fd;
struct sockaddr_storage ss;
in_port_t port;
- int backlog;
struct timeval timeout;
struct event ev;
struct smtpd *env;