Hi Jukka,
> >> +static gboolean cache_check_if_valid(struct cache_data *data,
> >> + time_t current_time)
> >> +{
> >> + if (data == NULL)
> >> + return FALSE;
> >> +
> >> + if (data->inserted + data->timeout< current_time)
> >> + return FALSE;
> >> +
Hi Marcel,
On 07/21/2011 02:11 PM, Marcel Holtmann wrote:
Hi Jukka,
+ hdr = (void *) (buf + offset);
+
+ hdr->id = id;
+ hdr->qr = 1;
+ hdr->rcode = 0;
+ hdr->ancount = htons(answers);
+ hdr->nscount = 0;
+ hdr->arcount = 0;
I am still worried about
Hi Jukka,
> >> +static void send_cached_response(int sk, unsigned char *buf, int len,
> >> + const struct sockaddr *to, socklen_t tolen,
> >> + int protocol, int id, uint16_t answers)
> >> +{
> >> + struct domain_hdr *hdr;
> >> + int err, offset
Hi Marcel,
On 07/20/2011 03:45 PM, Marcel Holtmann wrote:
Hi Jukka,
+static void send_cached_response(int sk, unsigned char *buf, int len,
+ const struct sockaddr *to, socklen_t tolen,
+ int protocol, int id, uint16_t answers)
+{
+
Hi Jukka,
> +static void send_cached_response(int sk, unsigned char *buf, int len,
> + const struct sockaddr *to, socklen_t tolen,
> + int protocol, int id, uint16_t answers)
> +{
> + struct domain_hdr *hdr;
> + int err, offset = pro
---
src/dnsproxy.c | 708 +++-
1 files changed, 699 insertions(+), 9 deletions(-)
diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index 9701343..37e6b1e 100644
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -32,6 +32,7 @@
#include
#include
#inc