Commit b20f7916 authored by pstew's avatar pstew Committed by Commit bot

Add an ONC property for disabling LCP echo

This CL maps an ONC property for disabling L2TP connection
monitoring via PPP LCP frames.

BUG=463602
TEST=Expanded test ONC and JSON test sets

Review URL: https://codereview.chromium.org/1058973002

Cr-Commit-Position: refs/heads/master@{#323943}
parent 59639a8a
...@@ -95,9 +95,10 @@ const OncFieldSignature xauth_fields[] = { ...@@ -95,9 +95,10 @@ const OncFieldSignature xauth_fields[] = {
const OncFieldSignature l2tp_fields[] = { const OncFieldSignature l2tp_fields[] = {
{::onc::kRecommended, &kRecommendedSignature}, {::onc::kRecommended, &kRecommendedSignature},
{::onc::vpn::kPassword, &kStringSignature}, {::onc::l2tp::kPassword, &kStringSignature},
{::onc::vpn::kSaveCredentials, &kBoolSignature}, {::onc::l2tp::kSaveCredentials, &kBoolSignature},
{::onc::vpn::kUsername, &kStringSignature}, {::onc::l2tp::kUsername, &kStringSignature},
{::onc::l2tp::kLcpEchoDisabled, &kBoolSignature},
{NULL}}; {NULL}};
const OncFieldSignature openvpn_fields[] = { const OncFieldSignature openvpn_fields[] = {
......
...@@ -54,11 +54,12 @@ const FieldTranslationEntry xauth_fields[] = { ...@@ -54,11 +54,12 @@ const FieldTranslationEntry xauth_fields[] = {
{NULL}}; {NULL}};
const FieldTranslationEntry l2tp_fields[] = { const FieldTranslationEntry l2tp_fields[] = {
{::onc::vpn::kPassword, shill::kL2tpIpsecPasswordProperty}, {::onc::l2tp::kPassword, shill::kL2tpIpsecPasswordProperty},
// We don't synchronize l2tp's SaveCredentials field for now, as Shill // We don't synchronize l2tp's SaveCredentials field for now, as Shill
// doesn't support separate settings for ipsec and l2tp. // doesn't support separate settings for ipsec and l2tp.
// { ::onc::vpn::kSaveCredentials, &kBoolSignature }, // { ::onc::l2tp::kSaveCredentials, &kBoolSignature },
{::onc::vpn::kUsername, shill::kL2tpIpsecUserProperty}, {::onc::l2tp::kUsername, shill::kL2tpIpsecUserProperty},
{::onc::l2tp::kLcpEchoDisabled, shill::kL2tpIpsecLcpEchoDisabledProperty},
{NULL}}; {NULL}};
const FieldTranslationEntry openvpn_fields[] = { const FieldTranslationEntry openvpn_fields[] = {
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
}, },
"L2TP": { "L2TP": {
"Username": "some username", "Username": "some username",
"Password": "some password" "Password": "some password",
"LcpEchoDisabled": true
} }
} }
} }
...@@ -8,5 +8,6 @@ ...@@ -8,5 +8,6 @@
"L2TPIPsec.XauthPassword": "some xauth password", "L2TPIPsec.XauthPassword": "some xauth password",
"L2TPIPsec.XauthUser": "some xauth username", "L2TPIPsec.XauthUser": "some xauth username",
"L2TPIPsec.Password": "some password", "L2TPIPsec.Password": "some password",
"L2TPIPsec.LCPEchoDisabled": true,
"SaveCredentials": true "SaveCredentials": true
} }
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"L2TPIPsec.User": "some username", "L2TPIPsec.User": "some username",
"L2TPIPsec.XauthPassword": "some xauth password", "L2TPIPsec.XauthPassword": "some xauth password",
"L2TPIPsec.XauthUser": "some xauth username", "L2TPIPsec.XauthUser": "some xauth username",
"L2TPIPsec.LCPEchoDisabled": true,
"Name": "MyL2TPVPN", "Name": "MyL2TPVPN",
"Provider.Host": "some.host.org", "Provider.Host": "some.host.org",
"Provider.Type": "l2tpipsec", "Provider.Type": "l2tpipsec",
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"Name": "MyL2TPVPN", "Name": "MyL2TPVPN",
"Provider": { "Provider": {
"Host": "some.host.org", "Host": "some.host.org",
"L2TPIPsec.LCPEchoDisabled": true,
"L2TPIPsec.PSK": "some_preshared_key", "L2TPIPsec.PSK": "some_preshared_key",
"L2TPIPsec.User": "some username", "L2TPIPsec.User": "some username",
"L2TPIPsec.XauthPassword": "some xauth password", "L2TPIPsec.XauthPassword": "some xauth password",
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
"L2TP": { "L2TP": {
"Username": "some username", "Username": "some username",
"Password": "some password", "Password": "some password",
"LcpEchoDisabled": true,
}, },
} }
} }
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
}, },
"L2TP": { "L2TP": {
"Username": "some username", "Username": "some username",
"Password": "some password" "Password": "some password",
"LcpEchoDisabled": true
} }
} }
} }
...@@ -314,6 +314,13 @@ const char kServerCARefs[] = "ServerCARefs"; ...@@ -314,6 +314,13 @@ const char kServerCARefs[] = "ServerCARefs";
const char kXAUTH[] = "XAUTH"; const char kXAUTH[] = "XAUTH";
} // namespace ipsec } // namespace ipsec
namespace l2tp {
const char kLcpEchoDisabled[] = "LcpEchoDisabled";
const char kPassword[] = "Password";
const char kSaveCredentials[] = "SaveCredentials";
const char kUsername[] = "Username";
} // namespace l2tp
namespace openvpn { namespace openvpn {
const char kAuthNoCache[] = "AuthNoCache"; const char kAuthNoCache[] = "AuthNoCache";
const char kAuthRetry[] = "AuthRetry"; const char kAuthRetry[] = "AuthRetry";
......
...@@ -332,6 +332,13 @@ ONC_EXPORT extern const char kServerCARefs[]; ...@@ -332,6 +332,13 @@ ONC_EXPORT extern const char kServerCARefs[];
ONC_EXPORT extern const char kXAUTH[]; ONC_EXPORT extern const char kXAUTH[];
} // namespace ipsec } // namespace ipsec
namespace l2tp {
ONC_EXPORT extern const char kLcpEchoDisabled[];
ONC_EXPORT extern const char kPassword[];
ONC_EXPORT extern const char kSaveCredentials[];
ONC_EXPORT extern const char kUsername[];
} // namespace l2tp
namespace openvpn { namespace openvpn {
ONC_EXPORT extern const char kAuthNoCache[]; ONC_EXPORT extern const char kAuthNoCache[];
ONC_EXPORT extern const char kAuthRetry[]; ONC_EXPORT extern const char kAuthRetry[];
......
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