Skip to content

Commit

Permalink
[pptp] Fix PPPD noipv6 option use. JB#54605
Browse files Browse the repository at this point in the history
  • Loading branch information
LaakkonenJussi committed Jun 11, 2021
1 parent 53673f2 commit 86f4008
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions connman/vpn/plugins/pptp.c
Expand Up @@ -447,7 +447,7 @@ static int run_connect(struct vpn_provider *provider,
const char *opt_s;
const char *host;
char *str;
bool no_ipv6 = false;
bool no_ipv6;
int err, i;

if (!username || !password) {
Expand Down Expand Up @@ -484,12 +484,6 @@ static int run_connect(struct vpn_provider *provider,
if (!opt_s)
continue;

if (!g_strcmp0(opt_s, "PPPD.NoIPv6")) {
no_ipv6 = vpn_provider_get_boolean(provider,
pptp_options[i].cm_opt, false);
continue;
}

if (pptp_options[i].type == OPT_STRING)
connman_task_add_argument(task,
pptp_options[i].pptp_opt, opt_s);
Expand All @@ -508,6 +502,7 @@ static int run_connect(struct vpn_provider *provider,
connman_task_add_argument(task, "plugin",
SCRIPTDIR "/libppp-plugin.so");

no_ipv6 = vpn_provider_get_boolean(provider, "PPPD.NoIPv6", false);
vpn_provider_set_supported_ip_networks(provider, true, !no_ipv6);

err = connman_task_run(task, vpn_died, provider,
Expand Down

0 comments on commit 86f4008

Please sign in to comment.