Skip to content

Commit

Permalink
v4.14-9529-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
dnobori committed Feb 2, 2015
1 parent 3305046 commit 64fd19e
Show file tree
Hide file tree
Showing 288 changed files with 373 additions and 324 deletions.
10 changes: 5 additions & 5 deletions src/Cedar/Cedar.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@


// Version number
#define CEDAR_VER 413
#define CEDAR_VER 414

// Build Number
#define CEDAR_BUILD 9525
#define CEDAR_BUILD 9529

// Beta number
//#define BETA_NUMBER 3
Expand All @@ -160,9 +160,9 @@
#define BUILD_DATE_Y 2015
#define BUILD_DATE_M 2
#define BUILD_DATE_D 2
#define BUILD_DATE_HO 10
#define BUILD_DATE_MI 28
#define BUILD_DATE_SE 53
#define BUILD_DATE_HO 17
#define BUILD_DATE_MI 33
#define BUILD_DATE_SE 33

// Tolerable time difference
#define ALLOW_TIMESTAMP_DIFF (UINT64)(3 * 24 * 60 * 60 * 1000)
Expand Down
2 changes: 2 additions & 0 deletions src/Cedar/Hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao)
GetHubAdminOptionDataAndSet(ao, "AssignVLanIdByRadiusAttribute", &o->AssignVLanIdByRadiusAttribute);
GetHubAdminOptionDataAndSet(ao, "SecureNAT_RandomizeAssignIp", &o->SecureNAT_RandomizeAssignIp);
GetHubAdminOptionDataAndSet(ao, "DetectDormantSessionInterval", &o->DetectDormantSessionInterval);
GetHubAdminOptionDataAndSet(ao, "NoPhysicalIPOnPacketLog", &o->NoPhysicalIPOnPacketLog);
}

// Convert the contents of the HUB_OPTION to data
Expand Down Expand Up @@ -668,6 +669,7 @@ void HubOptionStructToData(RPC_ADMIN_OPTION *ao, HUB_OPTION *o, char *hub_name)
Add(aol, NewAdminOption("AssignVLanIdByRadiusAttribute", o->AssignVLanIdByRadiusAttribute));
Add(aol, NewAdminOption("SecureNAT_RandomizeAssignIp", o->SecureNAT_RandomizeAssignIp));
Add(aol, NewAdminOption("DetectDormantSessionInterval", o->DetectDormantSessionInterval));
Add(aol, NewAdminOption("NoPhysicalIPOnPacketLog", o->NoPhysicalIPOnPacketLog));

Zero(ao, sizeof(RPC_ADMIN_OPTION));

Expand Down
1 change: 1 addition & 0 deletions src/Cedar/Hub.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ struct HUB_OPTION
bool AssignVLanIdByRadiusAttribute; // Assign the VLAN ID for the VPN session, by the attribute value of RADIUS
bool SecureNAT_RandomizeAssignIp; // Randomize the assignment IP address for new DHCP client
UINT DetectDormantSessionInterval; // Interval (seconds) threshold to detect a dormant VPN session
bool NoPhysicalIPOnPacketLog; // Disable saving physical IP address on the packet log
};

// MAC table entry
Expand Down
2 changes: 1 addition & 1 deletion src/Cedar/IPsec_L2TP.c
Original file line number Diff line number Diff line change
Expand Up @@ -1539,7 +1539,7 @@ void ProcL2TPPacketRecv(L2TP_SERVER *l2tp, UDPPACKET *p)
UINT client_assigned_id = (pp->Ver == 3 ? READ_UINT(a->Data) : READ_USHORT(a->Data));
if (GetTunnelFromIdOfAssignedByClient(l2tp, &p->SrcIP, client_assigned_id) == NULL)
{
if (LIST_NUM(l2tp->TunnelList) < L2TP_QUOTA_MAX_NUM_TUNNELS && GetNumL2TPTunnelsByClientIP(l2tp, &p->SrcIP) >= L2TP_QUOTA_MAX_NUM_TUNNELS_PER_IP)
if (LIST_NUM(l2tp->TunnelList) < L2TP_QUOTA_MAX_NUM_TUNNELS && GetNumL2TPTunnelsByClientIP(l2tp, &p->SrcIP) < L2TP_QUOTA_MAX_NUM_TUNNELS_PER_IP)
{
char ipstr[MAX_SIZE];
L2TP_PACKET *pp2;
Expand Down
32 changes: 32 additions & 0 deletions src/Cedar/Logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,7 @@ bool PacketLog(HUB *hub, SESSION *src_session, SESSION *dest_session, PKT *packe
SERVER *s;
UINT syslog_setting;
bool no_log = false;
HUB_OPTION *opt = NULL;
// Validate arguments
if (hub == NULL || src_session == NULL || packet == NULL)
{
Expand All @@ -1081,6 +1082,8 @@ bool PacketLog(HUB *hub, SESSION *src_session, SESSION *dest_session, PKT *packe
return true;
}

opt = hub->Option;

// Determine the logging level
level = CalcPacketLoggingLevel(hub, packet);
if (level == PACKET_LOG_NONE)
Expand Down Expand Up @@ -1155,6 +1158,21 @@ bool PacketLog(HUB *hub, SESSION *src_session, SESSION *dest_session, PKT *packe
pl->DestSessionName = CopyStr("");
}

if (opt == NULL || opt->NoPhysicalIPOnPacketLog == false)
{
if (src_session != NULL && src_session->NormalClient)
{
StrCpy(pl->SrcPhysicalIP, sizeof(pl->SrcPhysicalIP), src_session->ClientIP);
}

if (dest_session != NULL && dest_session->NormalClient)
{
StrCpy(pl->DestPhysicalIP, sizeof(pl->DestPhysicalIP), dest_session->ClientIP);
}

pl->WritePhysicalIP = true;
}

if (src_session->LoggingRecordCount != NULL)
{
UINT n = 0;
Expand Down Expand Up @@ -1493,6 +1511,10 @@ char *PacketLogParseProc(RECORD *rec)
// Generate each part
t = ZeroMalloc(sizeof(TOKEN_LIST));
t->NumTokens = 16;
if (pl->WritePhysicalIP)
{
t->NumTokens += 2;
}
t->Token = ZeroMalloc(sizeof(char *) * t->NumTokens);

// Source session
Expand Down Expand Up @@ -2028,6 +2050,16 @@ char *PacketLogParseProc(RECORD *rec)
BinToStr(data, p->PacketSize * 2 + 1, p->PacketData, p->PacketSize);
t->Token[15] = data;
}

// Physical IP addresses
if (StrLen(pl->SrcPhysicalIP) != 0)
{
t->Token[16] = CopyStr(pl->SrcPhysicalIP);
}
if (StrLen(pl->DestPhysicalIP) != 0)
{
t->Token[17] = CopyStr(pl->DestPhysicalIP);
}
}
else
{
Expand Down
3 changes: 3 additions & 0 deletions src/Cedar/Logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ struct PACKET_LOG
struct PKT *Packet;
char *SrcSessionName;
char *DestSessionName;
bool WritePhysicalIP;
char SrcPhysicalIP[64];
char DestPhysicalIP[64];
bool PurePacket; // Packet not cloned
bool PurePacketNoPayload; // Packet not cloned (without payload)
SESSION *SrcSession;
Expand Down
2 changes: 2 additions & 0 deletions src/Cedar/Protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2911,6 +2911,8 @@ bool ServerAccept(CONNECTION *c)
s->LocalHostSession = local_host_session;
s->NormalClient = true;

IPToStr(s->ClientIP, sizeof(s->ClientIP), &c->ClientIp);

if (c->FirstSock->IsRUDPSocket)
{
// R-UDP session
Expand Down
4 changes: 4 additions & 0 deletions src/Cedar/Server.c
Original file line number Diff line number Diff line change
Expand Up @@ -4105,6 +4105,7 @@ void SiLoadHubOptionCfg(FOLDER *f, HUB_OPTION *o)
o->AssignVLanIdByRadiusAttribute = CfgGetBool(f, "AssignVLanIdByRadiusAttribute");
o->SecureNAT_RandomizeAssignIp = CfgGetBool(f, "SecureNAT_RandomizeAssignIp");
o->DetectDormantSessionInterval = CfgGetInt(f, "DetectDormantSessionInterval");
o->NoPhysicalIPOnPacketLog = CfgGetBool(f, "NoPhysicalIPOnPacketLog");

// Enabled by default
if (CfgIsItem(f, "ManageOnlyPrivateIP"))
Expand Down Expand Up @@ -4182,6 +4183,7 @@ void SiWriteHubOptionCfg(FOLDER *f, HUB_OPTION *o)
CfgAddBool(f, "SuppressClientUpdateNotification", o->SuppressClientUpdateNotification);
CfgAddBool(f, "AssignVLanIdByRadiusAttribute", o->AssignVLanIdByRadiusAttribute);
CfgAddBool(f, "SecureNAT_RandomizeAssignIp", o->SecureNAT_RandomizeAssignIp);
CfgAddBool(f, "NoPhysicalIPOnPacketLog", o->NoPhysicalIPOnPacketLog);
CfgAddInt(f, "DetectDormantSessionInterval", o->DetectDormantSessionInterval);
CfgAddBool(f, "NoLookBPDUBridgeId", o->NoLookBPDUBridgeId);
CfgAddInt(f, "AdjustTcpMssValue", o->AdjustTcpMssValue);
Expand Down Expand Up @@ -7487,6 +7489,7 @@ void SiCalledUpdateHub(SERVER *s, PACK *p)
o.SecureNAT_RandomizeAssignIp = PackGetBool(p, "SecureNAT_RandomizeAssignIp");
o.DetectDormantSessionInterval = PackGetInt(p, "DetectDormantSessionInterval");
o.VlanTypeId = PackGetInt(p, "VlanTypeId");
o.NoPhysicalIPOnPacketLog = PackGetBool(p, "NoPhysicalIPOnPacketLog");
if (o.VlanTypeId == 0)
{
o.VlanTypeId = MAC_PROTO_TAGVLAN;
Expand Down Expand Up @@ -9328,6 +9331,7 @@ void SiPackAddCreateHub(PACK *p, HUB *h)
PackAddBool(p, "AssignVLanIdByRadiusAttribute", h->Option->AssignVLanIdByRadiusAttribute);
PackAddInt(p, "ClientMinimumRequiredBuild", h->Option->ClientMinimumRequiredBuild);
PackAddBool(p, "SecureNAT_RandomizeAssignIp", h->Option->SecureNAT_RandomizeAssignIp);
PackAddBool(p, "NoPhysicalIPOnPacketLog", h->Option->NoPhysicalIPOnPacketLog);
PackAddInt(p, "DetectDormantSessionInterval", h->Option->DetectDormantSessionInterval);
PackAddBool(p, "FixForDLinkBPDU", h->Option->FixForDLinkBPDU);
PackAddBool(p, "BroadcastLimiterStrictMode", h->Option->BroadcastLimiterStrictMode);
Expand Down
1 change: 1 addition & 0 deletions src/Cedar/Session.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ struct SESSION
bool InProcMode; // In-process mode
THREAD *Thread; // Management thread
CONNECTION *Connection; // Connection
char ClientIP[64]; // Client IP
CLIENT_OPTION *ClientOption; // Client connection options
CLIENT_AUTH *ClientAuth; // Client authentication data
volatile bool Halt; // Halting flag
Expand Down
6 changes: 3 additions & 3 deletions src/CurrentBuild.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BUILD_NUMBER 9525
VERSION 413
BUILD_NUMBER 9529
VERSION 414
BUILD_NAME beta
BUILD_DATE 20150202_102853
BUILD_DATE 20150202_173333
Binary file modified src/bin/hamcore/SeLow_x64.sys
Binary file not shown.
Binary file modified src/bin/hamcore/SeLow_x86.sys
Binary file not shown.
4 changes: 2 additions & 2 deletions src/bin/hamcore/inf/selow_x64/SeLow_x64.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = NetTrans
ClassGUID = {4D36E975-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_selow.cat

Expand Down Expand Up @@ -66,5 +66,5 @@ SeLow_Description = "A lightweight helper kernel-mode module for PacketiX VPN



; Auto Generated 20150202_105315.273
; Auto Generated 20150202_175649.910

Binary file modified src/bin/hamcore/inf/selow_x64/inf.cat
Binary file not shown.
4 changes: 2 additions & 2 deletions src/bin/hamcore/inf/selow_x86/SeLow_x86.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = NetTrans
ClassGUID = {4D36E975-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_selow.cat

Expand Down Expand Up @@ -66,5 +66,5 @@ SeLow_Description = "A lightweight helper kernel-mode module for PacketiX VPN



; Auto Generated 20150202_105023.921
; Auto Generated 20150202_175359.897

Binary file modified src/bin/hamcore/inf/selow_x86/inf.cat
Binary file not shown.
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN10.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN10.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN100.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN100.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN101.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN101.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN102.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN102.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN103.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN103.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN104.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN104.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN105.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN105.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN106.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN106.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN107.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN107.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN108.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN108.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN109.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN109.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN11.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN11.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN110.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN110.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN111.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN111.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN112.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN112.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN113.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN113.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN114.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN114.cat

Expand Down
2 changes: 1 addition & 1 deletion src/bin/hamcore/inf/x64/INF_VPN115.inf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signature = "$Windows NT$"
Class = Net
ClassGUID = {4D36E972-E325-11CE-BFC1-08002BE10318}
Provider = %CompanyName%
DriverVer = 02/02/2015, 4.13.0.9525
DriverVer = 02/02/2015, 4.14.0.9529

CatalogFile.NT = inf_VPN115.cat

Expand Down
Loading

0 comments on commit 64fd19e

Please sign in to comment.