From 486cfb8390a2e1ec61e244805020bf41be30f9cf Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Fri, 2 Jun 2023 14:48:32 -0700 Subject: [PATCH] Log attributes for proxy auto-config (PAC) in Pulse configuration 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 --- pulse.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pulse.c b/pulse.c index 7cb216d2..a5e981ef 100644 --- 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), -- 2.50.1