diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/smtp_session.c | 5 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpctl.c | 3 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c index 54c898f9900..640e5162180 100644 --- a/usr.sbin/smtpd/smtp_session.c +++ b/usr.sbin/smtpd/smtp_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp_session.c,v 1.117 2009/09/12 09:22:33 gilles Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.118 2009/09/12 09:38:45 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -526,6 +526,7 @@ session_command(struct session *s, char *cmd, size_t nr) if (nr > SMTP_CMDLINE_MAX) { session_respond(s, "500 Line too long"); + s->s_env->stats->smtp.cmdlinetoolong++; return; } @@ -1005,7 +1006,7 @@ session_readline(struct session *s, size_t *nr) if (line == NULL) { if (EVBUFFER_LENGTH(s->s_bev->input) > SMTP_ANYLINE_MAX) { session_respond(s, "500 Line too long"); - s->s_env->stats->smtp.cmdlinetoolong++; + s->s_env->stats->smtp.linetoolong++; s->s_flags |= F_QUIT; } return NULL; diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c index 4f247de8fd4..639debdc42a 100644 --- a/usr.sbin/smtpd/smtpctl.c +++ b/usr.sbin/smtpd/smtpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpctl.c,v 1.36 2009/09/12 09:22:33 gilles Exp $ */ +/* $OpenBSD: smtpctl.c,v 1.37 2009/09/12 09:38:45 gilles Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -282,6 +282,7 @@ show_stats_output(struct imsg *imsg) printf("runner.active=%zd\n", stats->runner.active); printf("smtp.errors.delays=%zd\n", stats->smtp.delays); + printf("smtp.errors.linetoolong=%zd\n", stats->smtp.linetoolong); printf("smtp.errors.cmdlinetoolong=%zd\n", stats->smtp.cmdlinetoolong); printf("smtp.errors.datalinetoolong=%zd\n", stats->smtp.datalinetoolong); printf("smtp.errors.read_eof=%zd\n", stats->smtp.read_eof); diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index e6a9faaab10..61d46925f88 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.140 2009/09/12 09:22:33 gilles Exp $ */ +/* $OpenBSD: smtpd.h,v 1.141 2009/09/12 09:38:45 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -664,6 +664,7 @@ struct s_session { size_t write_eof; size_t toofast; size_t tempfail; + size_t linetoolong; size_t cmdlinetoolong; size_t datalinetoolong; size_t delays; |