]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Bugfix Legacy IP split include/exclude routes for Pulse
authorDavid Overton <therealdave32@gmail.com>
Fri, 28 Jan 2022 22:49:46 +0000 (22:49 +0000)
committerDaniel Lenski <dlenski@gmail.com>
Mon, 7 Feb 2022 01:38:01 +0000 (17:38 -0800)
In 3d845bc9b, routing configuration was modified to use the `new_ip_info`
and `install_vpn_opts()`.  Pulse IPv6 split include/exclude handling were
modified accordingly in that commit, but Legacy IP split include/exclude
routes were overlooked.

Since `install_vpn_opts()` clobbers the split include/exclude routes, this
means Legacy IP split routes for Pulse have been ignored since then.

Closes https://gitlab.com/openconnect/openconnect/-/merge_requests/330

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

diff --git a/pulse.c b/pulse.c
index bd21754d979842eb8dde9de82d4a2ec2030889d3..d0e2fec06d95da49680ba93669fb9eacc7b89e74 100644 (file)
--- a/pulse.c
+++ b/pulse.c
@@ -2312,8 +2312,8 @@ static int handle_main_config_packet(struct openconnect_info *vpninfo,
                        if (inc) {
                                inc->route = add_option_dup(&new_opts, "split-include", buf, -1);
                                if (inc->route) {
-                                       inc->next = vpninfo->ip_info.split_includes;
-                                       vpninfo->ip_info.split_includes = inc;
+                                       inc->next = new_ip_info.split_includes;
+                                       new_ip_info.split_includes = inc;
                                } else
                                        free(inc);
                        }
@@ -2325,8 +2325,8 @@ static int handle_main_config_packet(struct openconnect_info *vpninfo,
                        if (exc) {
                                exc->route = add_option_dup(&new_opts, "split-exclude", buf, -1);
                                if (exc->route) {
-                                       exc->next = vpninfo->ip_info.split_excludes;
-                                       vpninfo->ip_info.split_excludes = exc;
+                                       exc->next = new_ip_info.split_excludes;
+                                       new_ip_info.split_excludes = exc;
                                } else
                                        free(exc);
                        }