Truncate DNS replies >512 bytes that the client isn't expecting.

This commit is contained in:
Simon Kelley
2015-12-21 17:20:35 +00:00
parent 5bb88f0963
commit 5aa5f0ff2f
2 changed files with 17 additions and 5 deletions

View File

@@ -339,9 +339,8 @@ size_t add_do_bit(struct dns_header *header, size_t plen, char *limit)
int check_source(struct dns_header *header, size_t plen, unsigned char *pseudoheader, union mysockaddr *peer)
{
/* Section 9.2, Check that subnet option in reply matches. */
int len, calc_len;
int len, calc_len;
struct subnet_opt opt;
unsigned char *p;
int code, i, rdlen;