2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

TLS: isc_nm_bad_request() and isc__nmsocket_reset() support

This commit adds implementations of isc_nm_bad_request() and
isc__nmsocket_reset() to the generic TLS stream code in order to make
it more compatible with TCP code.
This commit is contained in:
Artem Boldariev
2022-07-26 17:07:19 +03:00
parent 858e06e58d
commit c0808532e1
3 changed files with 24 additions and 4 deletions

View File

@@ -2330,6 +2330,11 @@ isc__nmsocket_reset(isc_nmsocket_t *sock) {
*/
REQUIRE(sock->parent == NULL);
break;
#ifdef HAVE_LIBNGHTTP2
case isc_nm_tlssocket:
isc__nmsocket_tls_reset(sock);
return;
#endif /* HAVE_LIBNGHTTP2 */
default:
UNREACHABLE();
break;
@@ -2548,6 +2553,10 @@ isc_nm_bad_request(isc_nmhandle_t *handle) {
return;
case isc_nm_tcpdnssocket:
case isc_nm_tlsdnssocket:
case isc_nm_tcpsocket:
#if HAVE_LIBNGHTTP2
case isc_nm_tlssocket:
#endif /* HAVE_LIBNGHTTP2 */
REQUIRE(sock->parent == NULL);
isc__nmsocket_reset(sock);
return;
@@ -2555,10 +2564,6 @@ isc_nm_bad_request(isc_nmhandle_t *handle) {
case isc_nm_httpsocket:
isc__nm_http_bad_request(handle);
return;
#endif /* HAVE_LIBNGHTTP2 */
case isc_nm_tcpsocket:
#if HAVE_LIBNGHTTP2
case isc_nm_tlssocket:
#endif /* HAVE_LIBNGHTTP2 */
default:
UNREACHABLE();