Bug 705

Summary: ub_ctx_set_fwd() return value mishandled
Product: unbound Reporter: Jonathan Gray <jsg>
Component: serverAssignee: unbound team <unbound-team>
Severity: enhancement CC: cathya, wouter
Priority: P5    
Version: 1.5.4   
Hardware: x86_64   
OS: OpenBSD   
Attachments: patch to correct the return value

Description Jonathan Gray 2015-09-05 08:20:55 CEST
Created attachment 296 [details]
patch to correct the return value

In ub_ctx_resolvconf() the code does "(retval = ub_ctx_set_fwd() != 0).  Due to != having higher precedence than = this means all non 0 return values will be treated as 1.
Comment 1 Wouter Wijngaards 2015-09-22 11:01:03 CEST
Hi Jonathan,

Thank you for the patch, I have applied it.

By the way that code is ifdef for windows, not OpenBSD, where it would use line 996.

Best regards, Wouter