mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-07 08:14:58 +03:00
Added the "OpenVPNPushDummyIPv4AddressOnL2Mode" option for the OpenVPN L2 mode.
To fix the bug of OpenVPN 2.4.6 and particular version of kernel mode TAP driver on Linux, the TAP device must be up after the OpenVPN client is connected. However there is no direct push instruction to do so to OpenVPN client. Therefore we push the dummy IPv4 address (RFC7600) to the OpenVPN client to enforce the TAP driver UP state.
This commit is contained in:
@ -5872,6 +5872,17 @@ void SiLoadServerCfg(SERVER *s, FOLDER *f)
|
||||
}
|
||||
}
|
||||
|
||||
// OpenVPN Push a dummy IPv4 address on L2 mode
|
||||
if (CfgIsItem(f, "OpenVPNPushDummyIPv4AddressOnL2Mode") == false)
|
||||
{
|
||||
// Default enable
|
||||
c->OpenVPNPushDummyIPv4AddressOnL2Mode = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
c->OpenVPNPushDummyIPv4AddressOnL2Mode = CfgGetBool(f, "OpenVPNPushDummyIPv4AddressOnL2Mode");
|
||||
}
|
||||
|
||||
// Disable the NAT-traversal feature
|
||||
s->DisableNatTraversal = CfgGetBool(f, "DisableNatTraversal");
|
||||
|
||||
@ -6289,6 +6300,8 @@ void SiWriteServerCfg(FOLDER *f, SERVER *s)
|
||||
|
||||
CfgAddStr(f, "OpenVPNDefaultClientOption", c->OpenVPNDefaultClientOption);
|
||||
|
||||
CfgAddBool(f, "OpenVPNPushDummyIPv4AddressOnL2Mode", c->OpenVPNPushDummyIPv4AddressOnL2Mode);
|
||||
|
||||
if (c->Bridge == false)
|
||||
{
|
||||
OPENVPN_SSTP_CONFIG config;
|
||||
|
Reference in New Issue
Block a user