CISCO_DEF_DOMAIN set incorrectly by OpenConnect Juniper mode

Tom Metro tmetro+openconnect at
Fri Jun 19 09:13:30 PDT 2015

I'm using a patched (see prior thread[1]) OpenConnect 7.05 on a VM
running Ubuntu 14.10 to connect to a Juniper VPN server.

I've observed that the stock /etc/vpnc/vpnc-script is incorrectly
setting the list of search domains in /etc/resolv.conf. The list is
comma (and space) delimited, yet resolvconf is documented as requiring
only space as the delimiter, and the commas do break the functionality.

As vpnc-script passes on the search list verbatim, I'm guessing the
problem is that the Juniper-specific code is not setting up the
$CISCO_DEF_DOMAIN environment variable in a way that is compatible with
the Cisco code.

I've worked around the issue by placing a wrapper around vpnc-script as

# repair the list of search domains so they are space delimited and not
# comma delimited
echo -n Unrepaired search domain list:
"$(echo "$CISCO_DEF_DOMAIN" | perl -pe 'tr/, / /s;')"
echo -n Repaired search domain list:
# Execute default script
. /etc/vpnc/vpnc-script
# End of script

and then using OC's --script switch to call the above script.



More information about the openconnect-devel mailing list