projects
/
project
/
mdnsd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
basic support for the cache flush bit
[project/mdnsd.git]
/
dns.c
diff --git
a/dns.c
b/dns.c
index
3f6ecbe
..
c5323e5
100644
(file)
--- a/
dns.c
+++ b/
dns.c
@@
-299,6
+299,9
@@
parse_answer(struct interface *iface, uint8_t *buffer, int len, uint8_t **b, int
return -1;
}
return -1;
}
+ if ((a->class & ~CLASS_FLUSH) != CLASS_IN)
+ return -1;
+
rdata = *b;
if (a->rdlength > *rlen) {
fprintf(stderr, "dropping: bad question\n");
rdata = *b;
if (a->rdlength > *rlen) {
fprintf(stderr, "dropping: bad question\n");
@@
-309,7
+312,7
@@
parse_answer(struct interface *iface, uint8_t *buffer, int len, uint8_t **b, int
*b += a->rdlength;
if (cache)
*b += a->rdlength;
if (cache)
- cache_answer(iface, buffer, len, name, a, rdata);
+ cache_answer(iface, buffer, len, name, a, rdata
, a->class & CLASS_FLUSH
);
return 0;
}
return 0;
}