Commit 11158b84 authored by Jussi Laakkonen's avatar Jussi Laakkonen

[settings-vpn] Add ping, ping-exit and remap-usr1 to OpenVPN provisioning. JB#51497

Support ping, ping-exit and remap-usr1 values loaded from OpenVPN
config. remap-usr1 should have either SIGHUP or SIGTERM but verification
is not done here.

Prevent use of ping-restart and connect-retry-max as they should not be
allowed with ConnMan, since both will mess up with the VPN connectivity
when restarts happen.

Add remap-usr1 as supported OpenVPN option
parent 0ee30360
......@@ -799,8 +799,26 @@ QVariantMap SettingsVpnModel::processOpenVpnProvisioningFile(QFile &provisioning
if (!arguments.isEmpty()) {
rv.insert(QStringLiteral("OpenVPN.RemoteCertTls"), arguments.join(QChar(' ')));
} else if (directive == QStringLiteral("ping")) {
if (!arguments.isEmpty()) {
rv.insert(QStringLiteral("OpenVPN.Ping"), arguments.join(QChar(' ')));
} else if (directive == QStringLiteral("ping-exit")) {
if (!arguments.isEmpty()) {
rv.insert(QStringLiteral("OpenVPN.PingExit"), arguments.join(QChar(' ')));
} else if (directive == QStringLiteral("remap-usr1")) {
if (!arguments.isEmpty()) {
rv.insert(QStringLiteral("OpenVPN.RemapUsr1"), arguments.join(QChar(' ')));
} else if (directive == QStringLiteral("ping-restart")) {
// Ignore, must not be set with ConnMan
qInfo() << "Ignoring ping-restart with OpenVPN";
} else if (directive == QStringLiteral("connect-retry-max")) {
// Ignore, must not be set with ConnMan
qInfo() << "Ignoring connect-retry-max with OpenVPN";
} else {
// A directive that connman does not care about - pass through to the config file
// A directive that ConnMan does not care about - pass through to the config file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment