mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-23 20:21:53 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ff66da573 | ||
|
|
d823d8e9cd | ||
|
|
2c78b6db6c | ||
|
|
4bf46ceb37 | ||
|
|
7d42376a3a | ||
|
|
08cc209e7a |
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
version 2.93
|
version 2.93
|
||||||
Fix a corner-case in DNSSEC validation with wildcards. If we have
|
Fix a corner-case in DNSSEC validation with wildcards. If we have
|
||||||
a wildcard record *.example.com and recieve a query for
|
a wildcard record *.example.com and receive a query for
|
||||||
a.example.com then that's OK, but we have to check that there isn't
|
a.example.com then that's OK, but we have to check that there isn't
|
||||||
an actual a.example.com record. The corner case is when we get a
|
an actual a.example.com record. The corner case is when we get a
|
||||||
query for *.example.com in that case the non-existence check
|
query for *.example.com in that case the non-existence check
|
||||||
@@ -19,7 +19,7 @@ version 2.93
|
|||||||
(eg rivcoed.org) will still fail. Thanks to Petr Menšík
|
(eg rivcoed.org) will still fail. Thanks to Petr Menšík
|
||||||
for the bug report.
|
for the bug report.
|
||||||
|
|
||||||
Fix DNSSEC fail with CNAME replies to DS queries. As CNAME reply
|
Fix DNSSEC fail with CNAME replies to DS queries. A CNAME reply
|
||||||
to a DNSSEC query was confusing the validation logic. It now
|
to a DNSSEC query was confusing the validation logic. It now
|
||||||
accepts a signed CNAME reply to a DS query as proof that no DS
|
accepts a signed CNAME reply to a DS query as proof that no DS
|
||||||
exists at the domain. This fixes the DS/zone break detection logic.
|
exists at the domain. This fixes the DS/zone break detection logic.
|
||||||
|
|||||||
@@ -154,6 +154,9 @@ allows the log file to be rotated without stopping dnsmasq.
|
|||||||
.B --log-debug
|
.B --log-debug
|
||||||
Enable extra logging intended for debugging rather than information.
|
Enable extra logging intended for debugging rather than information.
|
||||||
.TP
|
.TP
|
||||||
|
.B --log-malloc
|
||||||
|
Enable logging of memory allocation and release, for debugging.
|
||||||
|
.TP
|
||||||
.B --log-async[=<lines>]
|
.B --log-async[=<lines>]
|
||||||
Enable asynchronous logging and optionally set the limit on the
|
Enable asynchronous logging and optionally set the limit on the
|
||||||
number of lines
|
number of lines
|
||||||
|
|||||||
+15
-11
@@ -177,7 +177,7 @@ static int get_rdata(struct dns_header *header, size_t plen, struct rdata_state
|
|||||||
if ((state->c = state->end - state->ip) != 0)
|
if ((state->c = state->end - state->ip) != 0)
|
||||||
{
|
{
|
||||||
state->op = state->ip;
|
state->op = state->ip;
|
||||||
state->ip = state->end;;
|
state->ip = state->end;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
@@ -189,23 +189,27 @@ static int get_rdata(struct dns_header *header, size_t plen, struct rdata_state
|
|||||||
if (d == (u16)0)
|
if (d == (u16)0)
|
||||||
{
|
{
|
||||||
/* domain-name, canonicalise */
|
/* domain-name, canonicalise */
|
||||||
int len;
|
|
||||||
|
|
||||||
|
/* If the name is malformed, or runs beyond the end of the RR, abort.
|
||||||
|
under no circumstances should state->ip be beyond state->end since
|
||||||
|
that will cause the run-out code above to turn the negative
|
||||||
|
calculted length into a very large postive value for state->c
|
||||||
|
and overrun the buffer. */
|
||||||
if (!extract_name(header, plen, &state->ip, state->buff, EXTR_NAME_EXTRACT, 0) ||
|
if (!extract_name(header, plen, &state->ip, state->buff, EXTR_NAME_EXTRACT, 0) ||
|
||||||
(len = to_wire(state->buff)) == 0)
|
state->ip > state->end)
|
||||||
continue;
|
return 0;
|
||||||
|
|
||||||
state->c = len;
|
/* to_wire() always returns length > 0 */
|
||||||
|
state->c = to_wire(state->buff);
|
||||||
state->op = (unsigned char *)state->buff;
|
state->op = (unsigned char *)state->buff;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* plain data preceding a domain-name, don't run off the end of the data */
|
/* Plain data preceding a domain-name.
|
||||||
if ((state->end - state->ip) < d)
|
Handle short RR, if there are no bytes left, return finished. */
|
||||||
d = state->end - state->ip;
|
if ((state->end - state->ip) < d &&
|
||||||
|
(d = state->end - state->ip) == 0)
|
||||||
if (d == 0)
|
return 0;
|
||||||
continue;
|
|
||||||
|
|
||||||
state->op = state->ip;
|
state->op = state->ip;
|
||||||
state->c = d;
|
state->c = d;
|
||||||
|
|||||||
@@ -6270,8 +6270,12 @@ void read_opts(int argc, char **argv, char *compile_opts)
|
|||||||
|
|
||||||
if ((token = strtok(NULL, " \t\n\r")) &&
|
if ((token = strtok(NULL, " \t\n\r")) &&
|
||||||
(daemon->domain_suffix = canonicalise_opt(token)))
|
(daemon->domain_suffix = canonicalise_opt(token)))
|
||||||
|
{
|
||||||
|
/* We don't call get_line_alloc() until it returns false and frees the automatically */
|
||||||
|
get_line_alloc(NULL, &line, &linesz);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
|
|||||||
+5
-4
@@ -947,7 +947,7 @@ int kernel_version(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define hash_ptr(x) (((unsigned int)(((char *)(x)) - ((char *)NULL))) & 0xffffff)
|
#define hash_ptr(x) (((uintptr_t)(x)) & 0xffffff)
|
||||||
|
|
||||||
void *whine_malloc_real(const char *func, unsigned int line, size_t size)
|
void *whine_malloc_real(const char *func, unsigned int line, size_t size)
|
||||||
{
|
{
|
||||||
@@ -1038,15 +1038,14 @@ void free_real(const char *func, unsigned int line, void *ptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* get lines from f, expand buffer as required. Buffer is freed when
|
/* get lines from f, expand buffer as required. Buffer is freed when
|
||||||
EOF reached and we return zero. */
|
EOF reached and we return zero. Buffer also freed if f == NULL. */
|
||||||
int get_line_alloc(FILE *f, char **buffp, size_t *sizep)
|
int get_line_alloc(FILE *f, char **buffp, size_t *sizep)
|
||||||
{
|
{
|
||||||
char c;
|
|
||||||
size_t cnt = 0;
|
size_t cnt = 0;
|
||||||
char *buff = *buffp;
|
char *buff = *buffp;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
c = getc(f);
|
int c = f ? getc(f) : EOF;
|
||||||
|
|
||||||
if (cnt == *sizep)
|
if (cnt == *sizep)
|
||||||
{
|
{
|
||||||
@@ -1081,6 +1080,8 @@ int get_line_alloc(FILE *f, char **buffp, size_t *sizep)
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
free(buff);
|
free(buff);
|
||||||
|
*buffp = NULL;
|
||||||
|
*sizep = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user