From b27fb75d467d06108e73c5b49615c07da7eea4ec Mon Sep 17 00:00:00 2001 From: xiaosuGW Date: Fri, 9 Jul 2021 12:46:13 -0500 Subject: [PATCH] output client port number in the log --- runtime/include/sandbox_receive_request.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/include/sandbox_receive_request.h b/runtime/include/sandbox_receive_request.h index b974321..79535b1 100644 --- a/runtime/include/sandbox_receive_request.h +++ b/runtime/include/sandbox_receive_request.h @@ -61,9 +61,9 @@ sandbox_receive_request(struct sandbox *sandbox) == NULL)) { debuglog("Failed to log client_address: %s", strerror(errno)); } - + uint16_t port = (((struct sockaddr_in6*)&sandbox->client_address)->sin6_port); debuglog("Sandbox %lu: recv returned 0 before a complete request was received\n", sandbox->id); - debuglog("Socket: %d. Address: %s\n", fd, client_address_text); + debuglog("Socket: %d. Address: %s, Port: %u\n", fd, client_address_text, port); http_request_print(&sandbox->http_request); goto err; }