diff options
author | dnobori <da.git@softether.co.jp> | 2014-11-18 06:05:48 +0300 |
---|---|---|
committer | dnobori <da.git@softether.co.jp> | 2014-11-18 06:05:48 +0300 |
commit | 75f9836ce5f0a1dea2c3fe304bbc26c962ee64bf (patch) | |
tree | 2cb9d8360aa6f5fb7dd38eb9938aa24a2df3bfeb /src/Cedar/Interop_OpenVPN.c | |
parent | 2b3a4d0b757e3c46f175c0a0df66a84ffbe2b39c (diff) |
v4.12-9514-beta
Diffstat (limited to 'src/Cedar/Interop_OpenVPN.c')
-rw-r--r-- | src/Cedar/Interop_OpenVPN.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Cedar/Interop_OpenVPN.c b/src/Cedar/Interop_OpenVPN.c index 3d125b7f..3f4ae23d 100644 --- a/src/Cedar/Interop_OpenVPN.c +++ b/src/Cedar/Interop_OpenVPN.c @@ -766,6 +766,7 @@ void OvsSetupSessionParameters(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_C {
LIST *o;
BUF *b;
+ char opt_str[MAX_SIZE];
// Validate arguments
if (s == NULL || se == NULL || c == NULL || data == NULL)
{
@@ -779,7 +780,14 @@ void OvsSetupSessionParameters(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_C OvsLog(s, se, c, "LO_OPTION_STR_RECV", data->OptionString);
- o = OvsParseOptions(data->OptionString);
+ Zero(opt_str, sizeof(opt_str));
+ StrCpy(opt_str, sizeof(opt_str), data->OptionString);
+ if (s->Cedar != NULL && (IsEmptyStr(opt_str) || StartWith(opt_str, "V0 UNDEF") || InStr(opt_str, ",") == false))
+ {
+ StrCpy(opt_str, sizeof(opt_str), s->Cedar->OpenVPNDefaultClientOption);
+ }
+
+ o = OvsParseOptions(opt_str);
if (se->Mode == OPENVPN_MODE_UNKNOWN)
{
|