Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordnobori <da.git@softether.co.jp>2017-12-21 16:46:36 +0300
committerdnobori <da.git@softether.co.jp>2017-12-21 16:46:36 +0300
commitaf7b4d4afba44fc04c808a95ad5f49f5682e796d (patch)
treeffa187f24eed72e950342a942bd7b5e173ae3a50 /src/Cedar/Virtual.c
parentcbce9e3358bf06e5245dbbd76590b028a602e895 (diff)
v4.24-9652-betav4.24-9652-beta
Diffstat (limited to 'src/Cedar/Virtual.c')
-rw-r--r--src/Cedar/Virtual.c98
1 files changed, 0 insertions, 98 deletions
diff --git a/src/Cedar/Virtual.c b/src/Cedar/Virtual.c
index 4d25efcc..7cf3b840 100644
--- a/src/Cedar/Virtual.c
+++ b/src/Cedar/Virtual.c
@@ -6955,104 +6955,6 @@ NAT_ENTRY *CreateNatDns(VH *v, UINT src_ip, UINT src_port, UINT dest_ip, UINT de
return n;
}
-// Get the next byte
-UCHAR GetNextByte(BUF *b)
-{
- UCHAR c = 0;
- // Validate arguments
- if (b == NULL)
- {
- return 0;
- }
-
- if (ReadBuf(b, &c, 1) != 1)
- {
- return 0;
- }
-
- return c;
-}
-
-// Interpret the DNS query
-bool ParseDnsQuery(char *name, UINT name_size, void *data, UINT data_size)
-{
- BUF *b;
- char tmp[257];
- bool ok = true;
- USHORT val;
- // Validate arguments
- if (name == NULL || data == NULL || data_size == 0)
- {
- return false;
- }
- StrCpy(name, name_size, "");
-
- b = NewBuf();
- WriteBuf(b, data, data_size);
- SeekBuf(b, 0, 0);
-
- while (true)
- {
- UINT next_len = (UINT)GetNextByte(b);
- if (next_len > 0)
- {
- // Read only the specified length
- Zero(tmp, sizeof(tmp));
- if (ReadBuf(b, tmp, next_len) != next_len)
- {
- ok = false;
- break;
- }
- // Append
- if (StrLen(name) != 0)
- {
- StrCat(name, name_size, ".");
- }
- StrCat(name, name_size, tmp);
- }
- else
- {
- // Read all
- break;
- }
- }
-
- if (ReadBuf(b, &val, sizeof(val)) != sizeof(val))
- {
- ok = false;
- }
- else
- {
- if (Endian16(val) != 0x01 && Endian16(val) != 0x0c)
- {
- ok = false;
- }
- }
-
- if (ReadBuf(b, &val, sizeof(val)) != sizeof(val))
- {
- ok = false;
- }
- else
- {
- if (Endian16(val) != 0x01)
- {
- ok = false;
- }
- }
-
- FreeBuf(b);
-
- if (ok == false || StrLen(name) == 0)
- {
- return false;
- }
- else
- {
- return true;
- }
-}
-
// Set the VGS host name
void SetDnsProxyVgsHostname(char *hostname)
{