From 44de1d5befcd30c2924795a07ffb3ce30ae60dc5 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Wed, 9 Oct 2024 23:16:26 -0700 Subject: [PATCH] wrap ns_nm_socket_type for testing The testing ns_client doesn't have a proper nmhandle. --- tests/ns/netmgr_wrap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/ns/netmgr_wrap.c b/tests/ns/netmgr_wrap.c index 725392fc5a..2adca97303 100644 --- a/tests/ns/netmgr_wrap.c +++ b/tests/ns/netmgr_wrap.c @@ -97,3 +97,15 @@ isc_nmhandle_detach(isc_nmhandle_t **handlep) { return; } + +isc_nmsocket_type +isc_nm_socket_type(const isc_nmhandle_t *handle ISC_ATTR_UNUSED) { + /* + * By arbitrary choice, we treat mock handles as if + * they were always for UDP sockets. If it's necessary + * to test with other socket types in the future, this + * could be changed to a global variable rather than a + * constant. + */ + return isc_nm_udpsocket; +}