Increase DNS transaction ID space from 250 to 65536 states (#1323)

This commit is contained in:
bert hubert 2016-07-19 21:24:54 +02:00 committed by Marcel Stör
parent b21b3e08aa
commit 05baef325d
1 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ static ip_addr_t dns_servers[DNS_MAX_SERVERS];
/** Contiguous buffer for processing responses */
//static u8_t dns_payload_buffer[LWIP_MEM_ALIGN_BUFFER(DNS_MSG_SIZE)];
static u8_t* dns_payload;
static u8_t dns_random;
static u16_t dns_random;
/**
* Initialize the resolver: set up the UDP pcb and configure the default server
* (DNS_SERVER_ADDRESS).
@ -570,7 +570,7 @@ dns_send(u8_t numdns, const char* name, u8_t id)
char *query, *nptr;
const char *pHostname;
u8_t n;
dns_random = os_random()%250;
dns_random = (u16_t)os_random();
LWIP_DEBUGF(DNS_DEBUG, ("dns_send: dns_servers[%"U16_F"] \"%s\": request\n",
(u16_t)(numdns), name));
LWIP_ASSERT("dns server out of array", numdns < DNS_MAX_SERVERS);