Skip to content

Fix isc_nm_listentlsdns() error path bug

The isc_nm_listentlsdns() function erroneously calls isc__nm_tcpdns_stoplistening() instead of isc__nm_tlsdns_stoplistening() when something goes wrong, which can cause an assertion failure.

05-Sep-2022 14:52:19.120 dns_requestmgr_create
05-Sep-2022 14:52:19.120 dns_requestmgr_create: 0x7f9300191380
05-Sep-2022 14:52:19.120 dispatch 0x7f92ffbff200: detach: refcount 2
05-Sep-2022 14:52:19.120 dispatch 0x7f92ffbff400: detach: refcount 2
05-Sep-2022 14:52:19.120 not using config file logging statement for logging due to -g option
05-Sep-2022 14:52:19.120 exclusive task mode: ending
05-Sep-2022 14:52:19.120 exclusive task mode: ended
05-Sep-2022 14:52:19.120 processing control channel 10.53.0.3#5312
05-Sep-2022 14:52:19.120 command channel listening on 10.53.0.3#5312
05-Sep-2022 14:52:19.120 listening on IPv4 interface lo, 10.53.0.3#5300
05-Sep-2022 14:52:19.120 listening on IPv4 interface lo, 10.53.0.3#853
05-Sep-2022 14:52:19.120 netmgr/tcpdns.c:620: REQUIRE(sock->type == isc_nm_tcpdnslistener) failed, back trace
05-Sep-2022 14:52:19.120 bin/named/.libs/lt-named(+0x246a4) [0x558afb0df6a4]
05-Sep-2022 14:52:19.120 lib/isc/.libs/libisc-9.19.5-dev.so(isc_assertion_failed+0xa) [0x7f930363353a]
05-Sep-2022 14:52:19.120 lib/isc/.libs/libisc-9.19.5-dev.so(isc__nm_tcpdns_stoplistening+0x108) [0x7f9303629ba8]
05-Sep-2022 14:52:19.120 lib/isc/.libs/libisc-9.19.5-dev.so(isc_nm_listentlsdns+0x355) [0x7f930362de25]
05-Sep-2022 14:52:19.120 lib/ns/.libs/libns-9.19.5-dev.so(+0x16566) [0x7f9303c83566]
05-Sep-2022 14:52:19.120 lib/ns/.libs/libns-9.19.5-dev.so(+0x173fc) [0x7f9303c843fc]
05-Sep-2022 14:52:19.120 lib/ns/.libs/libns-9.19.5-dev.so(ns_interfacemgr_scan+0x42) [0x7f9303c84982]
05-Sep-2022 14:52:19.120 bin/named/.libs/lt-named(+0x47ab1) [0x558afb102ab1]
05-Sep-2022 14:52:19.120 bin/named/.libs/lt-named(+0x4823d) [0x558afb10323d]
05-Sep-2022 14:52:19.120 lib/isc/.libs/libisc-9.19.5-dev.so(+0x56f1b) [0x7f9303656f1b]
05-Sep-2022 14:52:19.120 lib/isc/.libs/libisc-9.19.5-dev.so(+0x57269) [0x7f9303657269]
05-Sep-2022 14:52:19.120 lib/isc/.libs/libisc-9.19.5-dev.so(+0x3f1b6) [0x7f930363f1b6]
05-Sep-2022 14:52:19.120 /usr/lib/libuv.so.1(uv_run+0x161) [0x7f93031dd0c1]
05-Sep-2022 14:52:19.120 lib/isc/.libs/libisc-9.19.5-dev.so(+0x453c8) [0x7f93036453c8]
05-Sep-2022 14:52:19.120 bin/named/.libs/lt-named(main+0xe7e) [0x558afb0d489e]
05-Sep-2022 14:52:19.120 /usr/lib/libc.so.6(+0x232d0) [0x7f93026b22d0]
05-Sep-2022 14:52:19.120 /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f93026b238a]
05-Sep-2022 14:52:19.120 bin/named/.libs/lt-named(_start+0x25) [0x558afb0d51b5]
05-Sep-2022 14:52:19.120 exiting (due to assertion failure)

Merge request reports