mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
add a result code for ENOPROTOOPT, EPROTONOSUPPORT
there was no isc_result_t value for invalid protocol errors
that could be returned from libuv.
(cherry picked from commit 0393b54afb)
This commit is contained in:
parent
cdff6bb8ba
commit
2a714c25f8
3 changed files with 9 additions and 5 deletions
|
|
@ -95,6 +95,7 @@ typedef enum isc_result {
|
|||
ISC_R_TLSBADPEERCERT, /*%< TLS peer certificate verification failed */
|
||||
ISC_R_HTTP2ALPNERROR, /*%< ALPN for HTTP/2 failed */
|
||||
ISC_R_DOTALPNERROR, /*%< ALPN for DoT failed */
|
||||
ISC_R_INVALIDPROTO, /*%< invalid protocol */
|
||||
|
||||
DNS_R_LABELTOOLONG = 1 << 16,
|
||||
DNS_R_BADESCAPE,
|
||||
|
|
|
|||
|
|
@ -90,13 +90,15 @@ isc___nm_uverr2result(int uverr, bool dolog, const char *file,
|
|||
return (ISC_R_MAXSIZE);
|
||||
case UV_ENOTSUP:
|
||||
return (ISC_R_FAMILYNOSUPPORT);
|
||||
case UV_ENOPROTOOPT:
|
||||
case UV_EPROTONOSUPPORT:
|
||||
return (ISC_R_INVALIDPROTO);
|
||||
default:
|
||||
if (dolog) {
|
||||
UNEXPECTED_ERROR(
|
||||
file, line,
|
||||
"unable to convert libuv "
|
||||
"error code in %s to isc_result: %d: %s",
|
||||
func, uverr, uv_strerror(uverr));
|
||||
UNEXPECTED_ERROR("unable to convert libuv error code "
|
||||
"in %s (%s:%d) to isc_result: %d: %s",
|
||||
func, file, line, uverr,
|
||||
uv_strerror(uverr));
|
||||
}
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
[ISC_R_TLSBADPEERCERT] = "TLS peer certificate verification failed",
|
||||
[ISC_R_HTTP2ALPNERROR] = "ALPN for HTTP/2 failed",
|
||||
[ISC_R_DOTALPNERROR] = "ALPN for DoT failed",
|
||||
[ISC_R_INVALIDPROTO] = "invalid protocol",
|
||||
|
||||
[DNS_R_LABELTOOLONG] = "label too long",
|
||||
[DNS_R_BADESCAPE] = "bad escape",
|
||||
|
|
|
|||
Loading…
Reference in a new issue