diff options
author | 2020-12-21 11:44:07 +0000 | |
---|---|---|
committer | 2020-12-21 11:44:07 +0000 | |
commit | 97556c3c664cb47b0586409101eded914b4a642b (patch) | |
tree | b7c36946e14af15202f86f700bae5edd048309d6 | |
parent | Rewrite parse_netprefix to no longer use isc_sockaddr_fromin{,6}. (diff) | |
download | wireguard-openbsd-97556c3c664cb47b0586409101eded914b4a642b.tar.xz wireguard-openbsd-97556c3c664cb47b0586409101eded914b4a642b.zip |
Use NI_NUMERICSERV. We don't use the result and it's faster and is a
workaround for the memory-leak in asr.
smtp_session part from eric@
OK eric@ gilles@
-rw-r--r-- | usr.sbin/smtpd/mta_session.c | 5 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtp_session.c | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/mta_session.c b/usr.sbin/smtpd/mta_session.c index f6ae6337b9b..6f3917b5ffd 100644 --- a/usr.sbin/smtpd/mta_session.c +++ b/usr.sbin/smtpd/mta_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mta_session.c,v 1.137 2020/06/09 06:35:17 semarie Exp $ */ +/* $OpenBSD: mta_session.c,v 1.138 2020/12/21 11:44:07 martijn Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -274,7 +274,8 @@ mta_session(struct mta_relay *relay, struct mta_route *route, const char *mxname evtimer_set(&s->ev, mta_start, s); evtimer_add(&s->ev, &tv); } else if (waitq_wait(&route->dst->ptrname, mta_on_ptr, s)) { - resolver_getnameinfo(s->route->dst->sa, 0, mta_getnameinfo_cb, s); + resolver_getnameinfo(s->route->dst->sa, NI_NUMERICSERV, + mta_getnameinfo_cb, s); } } diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c index 60123ad9a80..469f161efa3 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.427 2020/11/20 20:37:56 jung Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.428 2020/12/21 11:44:07 martijn Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -637,8 +637,8 @@ smtp_session(struct listener *listener, int sock, s->fcrdns = 1; smtp_lookup_servername(s); } else { - resolver_getnameinfo((struct sockaddr *)&s->ss, NI_NAMEREQD, - smtp_getnameinfo_cb, s); + resolver_getnameinfo((struct sockaddr *)&s->ss, + NI_NAMEREQD | NI_NUMERICSERV, smtp_getnameinfo_cb, s); } /* session may have been freed by now */ |