Skip to content

Commit

Permalink
[l2tp] 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 86f4008 commit ca5f60e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions connman/vpn/plugins/l2tp.c
Expand Up @@ -387,7 +387,7 @@ static int write_pppd_option(struct vpn_provider *provider, int fd)
{
int i;
const char *opt_s;
bool no_ipv6 = false;
bool no_ipv6;

l2tp_write_option(fd, "nodetach", NULL);
l2tp_write_option(fd, "lock", NULL);
Expand All @@ -411,12 +411,6 @@ static int write_pppd_option(struct vpn_provider *provider, int fd)
if (!opt_s)
continue;

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

if (pppd_options[i].type == OPT_STRING)
l2tp_write_option(fd,
pppd_options[i].pppd_opt, opt_s);
Expand All @@ -432,6 +426,7 @@ static int write_pppd_option(struct vpn_provider *provider, int fd)
l2tp_write_option(fd, "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);

return 0;
Expand Down

0 comments on commit ca5f60e

Please sign in to comment.