1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-22 17:39:53 +03:00

Merge pull request #1511 from domosekai/ipstr

Fix IPv6 address display in session info dialog
This commit is contained in:
Yihong Wu 2021-12-09 12:55:10 +08:00 committed by GitHub
commit 528f313dbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -18969,7 +18969,7 @@ UINT PsSessionGet(CONSOLE *c, char *cmd_name, wchar_t *str, void *param)
char str[MAX_SIZE];
CT *ct = CtNewStandard();
if (t.ClientIp != 0)
if (t.ClientIp != 0 || IsZero(t.ClientIp6, sizeof(t.ClientIp6)) == false)
{
IPToStr4or6(str, sizeof(str), t.ClientIp, t.ClientIp6);
StrToUni(tmp, sizeof(tmp), str);

View File

@ -9614,7 +9614,7 @@ bool SmRefreshSessionStatus(HWND hWnd, SM_SERVER *s, void *param)
b = LvInsertStart();
if (t.ClientIp != 0)
if (t.ClientIp != 0 || IsZero(t.ClientIp6, sizeof(t.ClientIp6)) == false)
{
IPToStr4or6(str, sizeof(str), t.ClientIp, t.ClientIp6);
StrToUni(tmp, sizeof(tmp), str);

View File

@ -14871,7 +14871,7 @@ SOCK *NewSock()
UINT IPToUINT(IP *ip)
{
// Validate arguments
if (ip == NULL)
if (ip == NULL || IsIP6(ip))
{
return 0;
}