From 4fceebbdcfd68bfe4ae65d08eedfaae4b223bb7e Mon Sep 17 00:00:00 2001 From: Neel Goyal Date: Tue, 4 Feb 2014 10:07:47 -0500 Subject: [PATCH] Fix for issue #51 - do bit is always on --- src/context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/context.c b/src/context.c index 577622ee..31f19ffc 100644 --- a/src/context.c +++ b/src/context.c @@ -330,7 +330,7 @@ getdns_context_create_with_extended_memory_functions( result->edns_extended_rcode = 0; result->edns_version = 0; - result->edns_do_bit = 0; + result->edns_do_bit = 1; result->extension = NULL; result->extension_data = NULL; @@ -850,7 +850,7 @@ getdns_context_set_edns_do_bit(struct getdns_context *context, uint8_t value) { RETURN_IF_NULL(context, GETDNS_RETURN_INVALID_PARAMETER); /* 0 or 1 */ - if (value > 1) { + if (value != 1) { return GETDNS_RETURN_CONTEXT_UPDATE_FAIL; }