From 8dc438ce2c69e5f4a3e2822ea8c20fdf8e46cc63 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sat, 15 Jan 2022 08:10:01 +0000 Subject: [PATCH] http: access_log: fix nwsi check h2 logging often lacked the IP as it checked the af on the sa46_peer of the child stream when it meant to check the nwsi one. --- lib/roles/http/server/access-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/roles/http/server/access-log.c b/lib/roles/http/server/access-log.c index 98b13284c..155201932 100644 --- a/lib/roles/http/server/access-log.c +++ b/lib/roles/http/server/access-log.c @@ -96,7 +96,7 @@ lws_prepare_access_log_info(struct lws *wsi, char *uri_ptr, int uri_len, int met nwsi = lws_get_network_wsi(wsi); - if (wsi->sa46_peer.sa4.sin_family) + if (nwsi->sa46_peer.sa4.sin_family) lws_sa46_write_numeric_address(&nwsi->sa46_peer, ta, sizeof(ta)); else strncpy(ta, "unknown", sizeof(ta));