summaryrefslogtreecommitdiffstats
path: root/src/utils/knsupdate/knsupdate_exec.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/utils/knsupdate/knsupdate_exec.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/utils/knsupdate/knsupdate_exec.c b/src/utils/knsupdate/knsupdate_exec.c
index e201711..d716ffb 100644
--- a/src/utils/knsupdate/knsupdate_exec.c
+++ b/src/utils/knsupdate/knsupdate_exec.c
@@ -452,15 +452,23 @@ static int pkt_sendrecv(knsupdate_params_t *params)
return -1;
}
+ ret = net_init_crypto(&net, &params->tls_params, NULL, &params->quic_params);
+ if (ret != 0) {
+ ERR("failed to initialize crypto context (%s)", knot_strerror(ret));
+ net_clean(&net);
+ return -1;
+ }
+
ret = net_connect(&net);
- DBG("%s: send_msg = %d", __func__, net.sockfd);
if (ret != KNOT_EOK) {
+ ERR("failed to connect (%s)", knot_strerror(ret));
net_clean(&net);
return -1;
}
ret = net_send(&net, params->query->wire, params->query->size);
if (ret != KNOT_EOK) {
+ ERR("failed to send update (%s)", knot_strerror(ret));
net_close(&net);
net_clean(&net);
return -1;
@@ -471,8 +479,8 @@ static int pkt_sendrecv(knsupdate_params_t *params)
/* Wait for reception. */
int rb = net_receive(&net, params->answer->wire, params->answer->max_size);
- DBG("%s: receive_msg = %d", __func__, rb);
if (rb <= 0) {
+ ERR("failed to receive response (%s)", knot_strerror(rb));
net_close(&net);
net_clean(&net);
return -1;