mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Code tidying.
This commit is contained in:
17
src/edns0.c
17
src/edns0.c
@@ -191,16 +191,13 @@ size_t add_pseudoheader(struct dns_header *header, size_t plen, unsigned char *l
|
|||||||
if (!(p = skip_questions(header, plen)) ||
|
if (!(p = skip_questions(header, plen)) ||
|
||||||
!(p = skip_section(p,
|
!(p = skip_section(p,
|
||||||
ntohs(header->ancount) + ntohs(header->nscount) + ntohs(header->arcount),
|
ntohs(header->ancount) + ntohs(header->nscount) + ntohs(header->arcount),
|
||||||
header, plen)))
|
header, plen)) ||
|
||||||
{
|
p + 11 > limit)
|
||||||
free(buff);
|
{
|
||||||
return plen;
|
free(buff);
|
||||||
}
|
return plen; /* bad packet */
|
||||||
if (p + 11 > limit)
|
}
|
||||||
{
|
|
||||||
free(buff);
|
|
||||||
return plen; /* Too big */
|
|
||||||
}
|
|
||||||
*p++ = 0; /* empty name */
|
*p++ = 0; /* empty name */
|
||||||
PUTSHORT(T_OPT, p);
|
PUTSHORT(T_OPT, p);
|
||||||
PUTSHORT(udp_sz, p); /* max packet length, 512 if not given in EDNS0 header */
|
PUTSHORT(udp_sz, p); /* max packet length, 512 if not given in EDNS0 header */
|
||||||
|
|||||||
Reference in New Issue
Block a user