diff options
author | 2016-07-01 17:53:23 +0000 | |
---|---|---|
committer | 2016-07-01 17:53:23 +0000 | |
commit | dc89f6ba6f270426ce1ea22149e90b9607ddd74e (patch) | |
tree | 7a030ea2545ec0e0df4e8f4bf9a8864f0fc16751 | |
parent | Avoid printing f->f_lasttime and/or f->f_prevhost if they are empty. (diff) | |
download | wireguard-openbsd-dc89f6ba6f270426ce1ea22149e90b9607ddd74e.tar.xz wireguard-openbsd-dc89f6ba6f270426ce1ea22149e90b9607ddd74e.zip |
flag the local socket listener as local.
clarify check for local listeners.
ok gilles@ millert@
-rw-r--r-- | usr.sbin/smtpd/parse.y | 3 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtp_session.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y index d4c0fcbc1b7..6d14f9a2eae 100644 --- a/usr.sbin/smtpd/parse.y +++ b/usr.sbin/smtpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.185 2016/06/21 21:35:25 benno Exp $ */ +/* $OpenBSD: parse.y,v 1.186 2016/07/01 17:53:23 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -2093,6 +2093,7 @@ create_sock_listener(struct listen_opts *lo) lo->hostname = conf->sc_hostname; l->ss.ss_family = AF_LOCAL; l->ss.ss_len = sizeof(struct sockaddr *); + l->local = 1; config_listener(l, lo); return (l); diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c index 191cb1089c7..9bfcaa0187f 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.278 2016/06/29 06:46:06 eric Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.279 2016/07/01 17:53:23 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -694,7 +694,7 @@ smtp_session(struct listener *listener, int sock, rfc2822_body_callback(&s->tx->rfc2822_parser, dataline_callback, s); - if (hostname || listener->local || listener->port == 587) { + if (listener->local || listener->port == 587) { rfc2822_missing_header_callback(&s->tx->rfc2822_parser, "date", header_missing_callback, s); rfc2822_missing_header_callback(&s->tx->rfc2822_parser, "message-id", |