diff options
Diffstat (limited to 'NetworkPkg/DnsDxe')
-rw-r--r-- | NetworkPkg/DnsDxe/DnsImpl.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c index b196d181ca..42d51f0ed7 100644 --- a/NetworkPkg/DnsDxe/DnsImpl.c +++ b/NetworkPkg/DnsDxe/DnsImpl.c @@ -1574,8 +1574,8 @@ ConstructDNSQueryIp ( //
// Fill header
//
- DnsHeader = (DNS_HEADER *)Frag.Bulk;
- DnsHeader->Identification = (UINT16)AsmReadTsc ();
+ DnsHeader = (DNS_HEADER *) Frag.Bulk;
+ DnsHeader->Identification = (UINT16)NET_RANDOM (NetRandomInitSeed());
DnsHeader->Flags.Uint16 = 0x0000;
DnsHeader->Flags.Bits.RD = 1;
DnsHeader->Flags.Bits.OpCode = DNS_FLAGS_OPCODE_STANDARD;
@@ -1585,12 +1585,12 @@ ConstructDNSQueryIp ( DnsHeader->AuthorityNum = 0;
DnsHeader->AditionalNum = 0;
- DnsHeader->Identification = HTONS(DnsHeader->Identification);
- DnsHeader->Flags.Uint16 = HTONS(DnsHeader->Flags.Uint16);
- DnsHeader->QuestionsNum = HTONS(DnsHeader->QuestionsNum);
- DnsHeader->AnswersNum = HTONS(DnsHeader->AnswersNum);
- DnsHeader->AuthorityNum = HTONS(DnsHeader->AuthorityNum);
- DnsHeader->AditionalNum = HTONS(DnsHeader->AditionalNum);
+ DnsHeader->Identification = HTONS (DnsHeader->Identification);
+ DnsHeader->Flags.Uint16 = HTONS (DnsHeader->Flags.Uint16);
+ DnsHeader->QuestionsNum = HTONS (DnsHeader->QuestionsNum);
+ DnsHeader->AnswersNum = HTONS (DnsHeader->AnswersNum);
+ DnsHeader->AuthorityNum = HTONS (DnsHeader->AuthorityNum);
+ DnsHeader->AditionalNum = HTONS (DnsHeader->AditionalNum);
Frag.Len = sizeof (*DnsHeader);
|