handle EAI_SYSTEM. part of jumbo patch on PR 12876
This commit is contained in:
parent
9d367630fc
commit
c98f5d554b
7
gnu/dist/postfix/src/smtpd/smtpd_peer.c
vendored
7
gnu/dist/postfix/src/smtpd/smtpd_peer.c
vendored
@ -93,6 +93,11 @@ static int h_errno = TRY_AGAIN;
|
||||
)
|
||||
#endif
|
||||
|
||||
#ifdef INET6
|
||||
#define GAI_STRERROR(error) \
|
||||
((error = EAI_SYSTEM) ? gai_strerror(error) : strerror(errno))
|
||||
#endif
|
||||
|
||||
|
||||
/* Application-specific. */
|
||||
|
||||
@ -198,7 +203,7 @@ void smtpd_peer_init(SMTPD_STATE *state)
|
||||
error = getaddrinfo(state->name, NULL, &hints, &rnull);
|
||||
if (error) {
|
||||
msg_warn("%s: hostname %s verification failed: %s",
|
||||
state->addr, state->name, gai_strerror(error));
|
||||
state->addr, state->name, GAI_STRERROR(error));
|
||||
REJECT_PEER_NAME(state, (error == EAI_AGAIN ? 4 : 5));
|
||||
}
|
||||
/* memcmp() isn't needed if we use getaddrinfo */
|
||||
|
Loading…
Reference in New Issue
Block a user