netdb: Fixed buffer size used for sending DNS queries should depend on the configured DNS name size.

This commit is contained in:
Ritjaina 2017-06-23 06:30:33 -06:00 committed by Gregory Nutt
parent 096f72a365
commit 3e3729d35f

View File

@ -64,9 +64,14 @@
#define MAX_RETRIES 8
/* Buffer sizes */
/* Buffer sizes
*
* The SEND_BUFFER_SIZE depends the configured DNS name size,
* sizeof(DNS query0 = Header (12 bytes) + DNS Name (Variable) +
* Query type (2 bytes) + Query Class (2 bytes)
*/
#define SEND_BUFFER_SIZE 64
#define SEND_BUFFER_SIZE (32 + CONFIG_NETDB_DNSCLIENT_NAMESIZE)
#define RECV_BUFFER_SIZE CONFIG_NETDB_DNSCLIENT_MAXRESPONSE
/****************************************************************************