]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Log attributes for proxy auto-config (PAC) in Pulse configuration
authorDaniel Lenski <dlenski@gmail.com>
Fri, 2 Jun 2023 21:48:32 +0000 (14:48 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Fri, 30 Jun 2023 20:51:52 +0000 (13:51 -0700)
Per https://gitlab.com/openconnect/openconnect/-/issues/617#note_1413539553,
Pulse servers may send proxy auto-config information
(https://en.wikipedia.org/wiki/Proxy_auto-config) in two forms
in the main configuration packet:

- attr 0x4023 contains a URL where the PAC file can be downloaded
- attr 0x4009 contains the full contents of the PAC file (may
  be very large)

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

diff --git a/pulse.c b/pulse.c
index 7cb216d28caabdd4e7f0b1fa3a0fc71b8f81d6e7..a5e981ef9b2e61ce7e6433d1cd9795c77ad025d8 100644 (file)
--- a/pulse.c
+++ b/pulse.c
@@ -501,6 +501,16 @@ static int process_attr(struct openconnect_info *vpninfo, struct oc_vpn_option *
                add_option_dup(new_opts, "gateway6", buf, -1);
                break;
 
+       case 0x4009:
+               vpn_progress(vpninfo, PRG_INFO,
+                            _("Received proxy auto-config (PAC) payload of size %d\n"), attrlen);
+               break;
+
+       case 0x4023:
+               vpn_progress(vpninfo, PRG_INFO,
+                            _("Received proxy auto-config (PAC) URL: %.*s\n"), attrlen, data);
+               break;
+
        case 0x4024:
                /* This flag is supposed to be available starting with Pulse server 9.1R9 (see
                 * https://help.ivanti.com/ps/legacy/pcs/9.1rx/9.1r9/ps-pcs-sa-9.1r9.0-releasenotes.pdf),