]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Dump initial oNCP negotiation request if --dump-http-traffic is specified
authorDaniel Lenski <dlenski@gmail.com>
Wed, 25 Aug 2021 20:09:36 +0000 (20:09 +0000)
committerDaniel Lenski <dlenski@gmail.com>
Mon, 11 Oct 2021 23:14:37 +0000 (16:14 -0700)
Joachim Kuebart noted the absence of this output in
https://gitlab.com/openconnect/openconnect/-/merge_requests/271#note_654871352

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
oncp.c

diff --git a/oncp.c b/oncp.c
index f892dd9d701df4aac3aaf13b6230530cf0bb0522..6449f98bc6c5e5554dcd0e96feeddbe29498d009 100644 (file)
--- a/oncp.c
+++ b/oncp.c
@@ -509,6 +509,8 @@ int oncp_connect(struct openconnect_info *vpninfo)
                ret = buf_error(reqbuf);
                goto out;
        }
+       if (vpninfo->dump_http_traffic)
+               dump_buf(vpninfo, '>', reqbuf->data);
        ret = vpninfo->ssl_write(vpninfo, reqbuf->data, reqbuf->pos);
        if (ret < 0)
                goto out;