1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-07 18:20:41 +03:00
Commit Graph

234 Commits

Author SHA1 Message Date
Ilya Shipitsin
156166dba1 src/Cedar/Hub: resolve null pointer dereference found by coverity 2018-08-31 00:59:06 +05:00
Ilya Shipitsin
9675b0eb6d src/Cedar/IPsec_EtherIP: resolve "Identical code for different branches"
found by coverity
2018-08-31 00:56:00 +05:00
Ilya Shipitsin
2c2caa81bc src/Cedar/Interop_OpenVPN: resolve coverity "issue"
coverity thinks there might be null pointer dereference. we can
safely remove a check here, because OvsFreePacket checks for null
itself
2018-08-31 00:50:53 +05:00
Ilya Shipitsin
c81dfc0e58 src/Cedar/Session: modify code to avoid "Identical code for different branches", remove unused functions.
found by coverity, cppcheck

[src/Cedar/Session.c:1856]: (style) The function 'CompareSession' is never used.
[src/Cedar/Session.c:2384]: (style) The function 'DebugPrintSessionKey' is never used.
[src/Cedar/Session.c:2102]: (style) The function 'GetSessionFromKey32' is never used.
2018-08-29 12:36:09 +05:00
Davide Beatrici
3f8fa9d5d9
Merge PR #673: Cedar: custom TAP interface name support for FreeBSD, function refactor 2018-08-28 14:08:03 +02:00
Davide Beatrici
9d601c2745 CMake: set build info as compiler macros 2018-08-27 05:50:40 +02:00
Davide Beatrici
c21f427fc6 Divide version in multiple macros and set default values 2018-08-27 05:44:32 +02:00
Davide Beatrici
7f9177f3d7
Merge PR #671: resolve several coverity issues 2018-08-27 01:22:27 +02:00
Davide Beatrici
dbb0bb83f7 Cedar: fix segmentation fault during local bridge creation on FreeBSD 2018-08-27 00:46:59 +02:00
Davide Beatrici
37ced5c479 Cedar: custom TAP interface name support for FreeBSD, function refactor
The maximum number of TAP devices to iterate through has been increased from 16 to 512.
2018-08-26 04:20:57 +02:00
Ilya Shipitsin
dcd03476c4 src/Cedar/Connection: resolve null pointer dereference found by coverity,
remove unused function

[src/Cedar/Connection.c:2861]: (style) The function 'InitTcpSockRc4Key' is never used.
2018-08-24 15:26:14 +05:00
Ilya Shipitsin
a58d26f125 src/Cedar/IPsec_IKE.c: resolve null pointer dereference found by coverity,
remove unused variable

[src/Cedar/IPsec_IKE.c:4332] -> [src/Cedar/IPsec_IKE.c:4332]: (style) Same expression on both sides of '||'.
[src/Cedar/IPsec_IKE.c:1665]: (style) Variable 'zero' is assigned a value that is never used.
2018-08-24 15:25:34 +05:00
Ilya Shipitsin
2f7d71a567 src/Cedar/Cedar.c: resolve "Identical code for different branches", remove unused functions
found by coverity, cppcheck

[src/Cedar/Cedar.c:1605]: (style) The function 'EnableDebugLog' is never used.
[src/Cedar/Cedar.c:858]: (style) The function 'GetUnestablishedConnections' is never used.
[src/Cedar/Cedar.c:652]: (style) The function 'InitHiddenPassword' is never used.
[src/Cedar/Cedar.c:633]: (style) The function 'IsHiddenPasswordChanged' is never used.
[src/Cedar/Cedar.c:393]: (style) The function 'IsInNoSsl' is never used.
[src/Cedar/Cedar.c:1785]: (style) The function 'IsLaterBuild' is never used.
2018-08-24 15:23:45 +05:00
Davide Beatrici
3ff5c061d7 Add TAP devices support for FreeBSD and OpenBSD
Thanks to @kennylam777 for the first implementation: https://github.com/kennylam777/SoftEtherVPN/commits/FreeBSD-TAP
2018-08-23 10:56:30 +02:00
Davide Beatrici
7612c2bf5d Cedar: fix compilation on FreeBSD, broken by #337 2018-08-23 04:39:13 +02:00
Ilya Shipitsin
a2d5fb7015 src/Cedar/Client.c: remove redundant "if" statement, unused variable
found by coverity, cppcheck

[src/Cedar/Client.c:9094]: (style) Unused variable: i
[src/Cedar/Client.c:500] -> [src/Cedar/Client.c:503]: (style) Variable 'ret' is reassigned a value before the old one has been used.
2018-08-22 20:58:03 +05:00
Ilya Shipitsin
e8c6e2c1d9 src/Cedar/Client.c, src/Mayaqua/Network.c, src/Mayaqua/Unix.c: silence coverity 2018-08-22 10:40:13 +05:00
Ilya Shipitsin
5ecc80a14e src/Cedar/Virtual: coverity suspects null pointer dereference here
however, both Cancel() and ReleaseCancel() checks for NULL themselves,
so we can remove this check
2018-08-22 10:33:29 +05:00
Davide Beatrici
233b525d0e
Merge PR #662: Fix that virtual NAT session is closed even if data remains. 2018-08-21 13:04:06 +02:00
MtCedarNet
f9de4a06aa Fix that virtual NAT session is closed even if data remains. 2018-08-21 18:54:07 +09:00
Ilya Shipitsin
99cdd9fe92 src/Cedar/Protocol: remove dead code, silence coverity 2018-08-21 11:55:37 +05:00
Ilya Shipitsin
c98c7858bd src/Cedar/Virtual: resolve null pointer dereference
found by coverity
2018-08-21 11:36:01 +05:00
Ilya Shipitsin
f3ff7e2743 src/Cedar/BridgeUnix: resolve coverity "issue" 2018-08-21 11:04:48 +05:00
Ilya Shipitsin
b0ebd1f1d5 src/Cedar/Client: remove dead code, unused functions, variables
found by coverity, cppcheck

[src/Cedar/Client.c:10486]: (style) The function 'CiFreeInnerVPNServer' is never used.
[src/Cedar/Client.c:10877]: (style) The function 'CiGetNumActiveSessions' is never used.
[src/Cedar/Client.c:2042]: (style) The function 'CiHasAccountSensitiveInformationFile' is never used.
[src/Cedar/Client.c:10469]: (style) The function 'CiNewInnerVPNServer' is never used.
[src/Cedar/Client.c:1128]: (style) The function 'CncGetSessionId' is never used.
[src/Cedar/Client.c:767]: (style) The function 'CncPasswordDlgHaltThread' is never used.
[src/Cedar/Client.c:10681]: (style) The function 'CompareInternetSetting' is never used.
[src/Cedar/Client.c:11060]: (style) The function 'CtGetClient' is never used.
[src/Cedar/Client.c:5128]: (style) The function 'InRpcClientNotify' is never used.
[src/Cedar/Client.c:4340]: (style) The function 'InRpcEnumObjectInSecure' is never used.
[src/Cedar/Client.c:5140]: (style) The function 'OutRpcClientNotify' is never used.
[src/Cedar/Client.c:5657]: (style) Condition 'reg_port!=0' is always false
[src/Cedar/Client.c:683]: (style) Variable 'ret' is assigned a value that is never used.
[src/Cedar/Client.c:725]: (style) Variable 'ret' is assigned a value that is never used.
[src/Cedar/Client.c:1013]: (style) Variable 'param' is assigned a value that is never used.
2018-08-18 19:24:12 +05:00
Ilya Shipitsin
29c991c487 src/Cedar/BridgeUnix: null pointer dereference resolved, unused variables, functions removed
found by coverity, cppcheck

[src/Cedar/BridgeUnix.c:270] -> [src/Cedar/BridgeUnix.c:279]: (style) Variable 'ret' is reassigned a value before the old one has been used.
[src/Cedar/BridgeUnix.c:560] -> [src/Cedar/BridgeUnix.c:569]: (style) Variable 't' is reassigned a value before the old one has been used.
[src/Cedar/BridgeUnix.c:1528] -> [src/Cedar/BridgeUnix.c:1537]: (style) Variable 'ret' is reassigned a value before the old one has been used.
[src/Cedar/BridgeUnix.c:1278]: (style) Unused variable: c
[src/Cedar/BridgeUnix.c:1090]: (style) The function 'DlipAttachRequest' is never used.
2018-08-18 18:59:51 +05:00
Ilya Shipitsin
c4d1a10c2a src/Cedar/Command: remove dead code, null pointer dereference, unused functions, variables
found by coverity, cppcheck

[src/Cedar/Command.c:9378]: (style) Variable 'ret' is assigned a value that is never used.
[src/Cedar/Command.c:9999]: (style) The function 'CmdEvalNetworkAndSubnetMask6' is never used.
2018-08-18 17:55:24 +05:00
Davide Beatrici
0d966755d7
Merge PR #659: resolve cosmetic coverity issues 2018-08-18 08:09:22 +02:00
Davide Beatrici
daed1ad8b3
Merge PR #594: Remove SSLv3 support 2018-08-18 07:38:05 +02:00
Ilya Shipitsin
a71589e027 src/Cedar/EtherLog: silence coverity, remove unused functions
found by coverity, cppcheck

[src/Cedar/EtherLog.c:327]: (style) The function 'EcAddLicenseKey' is never used.
[src/Cedar/EtherLog.c:385]: (style) The function 'ElCheckLicense' is never used.
2018-08-18 10:25:30 +05:00
Ilya Shipitsin
e460f26b19 src/Cedar/IPsec_PPP: remove dead code, unused fuction
found by coverity, cppcheck

[src/Cedar/IPsec_PPP.c:2655]: (style) The function 'MsChapV2Client_GenerateChallenge' is never used.
2018-08-18 00:34:42 +05:00
Ilya Shipitsin
8a9309bedf src/Cedar/Command: remove dead code, unused variables and functions
found by cppcheck and coverity

[src/Cedar/Command.c:523] -> [src/Cedar/Command.c:532]: (style) Variable 'ok' is reassigned a value before the old one has been used.
[src/Cedar/Command.c:776]: (style) Variable 'tick2' is assigned a value that is never used.
[src/Cedar/Command.c:2244]: (style) Variable 'halt_timeout' is assigned a value that is never used.
[src/Cedar/Command.c:2246]: (style) Variable 'check_clock_seed' is assigned a value that is never used.
[src/Cedar/Command.c:2247]: (style) Variable 'halting' is assigned a value that is never used.
[src/Cedar/Command.c:6904]: (style) Unused variable: tmp
[src/Cedar/Command.c:12217]: (style) Variable 'packet_log' is assigned a value that is never used.
[src/Cedar/Command.c:20825]: (style) Variable 'ret' is assigned a value that is never used.
[src/Cedar/Command.c:20883]: (style) Variable 'ret' is assigned a value that is never used.
[src/Cedar/Command.c:20927]: (style) Variable 'ret' is assigned a value that is never used.
[src/Cedar/Command.c:10022]: (style) The function 'CmdEvalIpAndMask46' is never used.
[src/Cedar/Command.c:10109]: (style) The function 'CmdEvalNetworkAndSubnetMask46' is never used.
[src/Cedar/Command.c:23025]: (style) The function 'CmdPrintRow' is never used.
[src/Cedar/Command.c:167]: (style) The function 'InRpcTtResult' is never used.
[src/Cedar/Command.c:148]: (style) The function 'OutRpcTtResult' is never used.
2018-08-15 19:04:17 +05:00
Davide Beatrici
2692bb6b8e Interop_OpenVPN: set "subnet" topology and remove workaround for "net30" topology on Win32
The workaround was required for the "net30" topology because:
"There is a problem in your selection of --ifconfig endpoints [local=192.168.30.10, remote=192.168.30.1]. The local and remote VPN endpoints must exist within the same 255.255.255.252 subnet. This is a limitation of --dev tun when used with the TAP-WIN32 driver. Try 'openvpn --show-valid-subnets' option for more info."

See https://community.openvpn.net/openvpn/wiki/Topology for detailed info.
2018-08-15 02:39:33 +02:00
Ilya Shipitsin
f96a3b3989 src/Cedar/EtherLog: remove null dereference introduced in #650
also, remove unused functions:

[src/Cedar/EtherLog.c:1377]: (style) The function 'ElFree' is never used.
[src/Cedar/EtherLog.c:1370]: (style) The function 'ElInit' is never used.
2018-08-14 02:36:28 +05:00
Ilya Shipitsin
eb4efe3f1b src/Cedar/Session.c: avoid unintentional integer overflow
found by coverity
2018-08-13 15:40:45 +05:00
Ilya Shipitsin
ff1470cdce src/Cedar/Nat.c: resolve possible null dereference
found by coverity
2018-08-13 15:40:17 +05:00
Ilya Shipitsin
937da4a746 src/Cedar/EtherLog.c: resolve possible null dereference
found by coverity
2018-08-13 15:39:29 +05:00
Ilya Shipitsin
3ca4bc0aa9 src/Cedar/Logging: remove unused functions, redundant condition
[src/Cedar/Logging.c:679]: (style) The function 'HubLog' is never used.
[src/Cedar/Logging.c:888]: (style) The function 'IPCLog' is never used.
[src/Cedar/Logging.c:295]: (style) The function 'PrintEraseFileList' is never used.
[src/Cedar/Logging.c:1025]: (style) The function 'SecLog' is never used.
[src/Cedar/Logging.c:622]: (style) The function 'ServerLog' is never used.
[src/Cedar/Logging.c:2273]: (style) The function 'SetLogDirName' is never used.
[src/Cedar/Logging.c:2293]: (style) The function 'SetLogPrefix' is never used.
[src/Cedar/Logging.c:997]: (style) The function 'WriteMultiLineLog' is never used.
[src/Cedar/Logging.c:918]: (style) The function 'WriteSecurityLog' is never used.
[src/Cedar/Logging.c:1018] -> [src/Cedar/Logging.c:1006]:

(warning) Either the condition 'src_session!=NULL' is redundant or there is possible null
pointer dereference: src_session.
2018-08-13 07:13:56 +05:00
Ilya Shipitsin
6af1a2eb46 src/Cedar/Interop_OpenVPN: remove unused functions and variables
[src/Cedar/Interop_OpenVPN.c:2711]: (style) Variable 'now' is assigned a value that is never used.
[src/Cedar/Interop_OpenVPN.c:1053]: (style) The function 'OvsAddEntry' is never used.
[src/Cedar/Interop_OpenVPN.c:2610]: (style) The function 'OvsGetCompatibleL3IPNext' is never used.
[src/Cedar/Interop_OpenVPN.c:1047]: (style) The function 'OvsNewList' is never used.
[src/Cedar/Interop_OpenVPN.c:128]: (style) The function 'OvsSetNoOpenVpnTcp' is never used.
[src/Cedar/Interop_OpenVPN.c:140]: (style) The function 'OvsSetNoOpenVpnUdp' is never used.
2018-08-13 07:00:33 +05:00
Ilya Shipitsin
a7933800d0 src/Cedar/Logging.c: remove logically dead code
found by coverity
2018-08-12 16:22:09 +05:00
Ilya Shipitsin
2103520728 src/Cedar/Server.c: remove logically dead code
found by coverity
2018-08-12 16:19:29 +05:00
Ilya Shipitsin
b8af87adc1 src/Cedar/Interop_OpenVPN.c: remove logically dead code
found by coverity
2018-08-12 16:17:56 +05:00
Ilya Shipitsin
981e8d0e77 src/Cedar/Protocol.c: remove logically dead code
found by coverity
2018-08-12 16:15:53 +05:00
Ilya Shipitsin
e302cb5f74 src/Cedar/IPsec_PPP.c: remove logically dead code
found by coverity
2018-08-12 16:12:48 +05:00
Ilya Shipitsin
595245cd45 src/Cedar/IPsec_PPP.c: remove logically dead code
found by coverity
2018-08-12 16:07:13 +05:00
Ilya Shipitsin
ad41d54b29 src/Cedar/Command.c: remove logically dead code
found by coverity
2018-08-12 16:03:10 +05:00
Davide Beatrici
d3fc90f4e0
Merge PR #641: resolve several issues found by coverity 2018-08-12 12:28:49 +02:00
Davide Beatrici
3e4a2cabd8
Merge PR #640: Protocol: remove RC4 related stuff 2018-08-12 12:20:04 +02:00
Davide Beatrici
97a9070269
Merge PR #638: Interop_OpenVPN.c: convert the cipher name to lowercase prior to calling EVP_get_cipherbyname() 2018-08-12 12:18:50 +02:00
Ilya Shipitsin
35dc165651 src/Cedar/IPsec_PPP.c: avoid unintentional integer overflow
found by coverity
2018-08-12 15:10:44 +05:00
Ilya Shipitsin
3da4a9c5e3 src/Cedar/Hub.c: avoid unintentional integer overflow
found by coverity
2018-08-12 15:09:18 +05:00