OpenConnect already sets the according environment variables when the Pulse gateway sends "split-exclude" routes, so we only need to handle them in vpnc-script. Patch history: Original series: - assumed split-exclude targets and VPN gateway are reachable via the same uplink v2: - re-use current routing information for the "ip route" case for split-exclude routes, only guess about correct uplink for /sbin/route case - patches are now independent of each other, but I chose to leave them in the same series for better comparability. - throw away untested IPv6 code Please let me know what you think about the re-work. Original patches were tested successfully on Linux and FreeBSD and "partially-acked" by dlenski at gmail.com. v2 is successfully tested on Linux using "ip route" and /sbin/route mode, FreeBSD results will follow soon. Gernot Hillier Siemens AG, Corporate Competence Center Embedded Linux Gernot Hillier (3): Support routes with different devs and gateways Support split-exclude rules from Pulse gateway Revive route cleanup for /sbin/route code vpnc-script | 138 +++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 114 insertions(+), 24 deletions(-) -- 2.13.6