1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:48:12 +00:00

LookupServer: Randomize DNS request ID's

Suggested by @zecke in #10.
This commit is contained in:
Andreas Kling 2020-01-26 12:38:49 +01:00
parent 871b6b4e1a
commit 02be23cf81

View file

@ -2,13 +2,12 @@
#include "DNSPacket.h"
#include <AK/BufferStream.h>
#include <arpa/inet.h>
#include <stdlib.h>
#define C_IN 1
static u16 s_next_id = 0;
DNSRequest::DNSRequest()
: m_id(s_next_id++)
: m_id(arc4random_uniform(UINT16_MAX))
{
}