Bug 203 - botched logic for do_auto vs. do_ip4 and/or do_ip6 check
botched logic for do_auto vs. do_ip4 and/or do_ip6 check
Status: RESOLVED FIXED
Product: unbound
Classification: Unclassified
Component: server
unspecified
Other All
: P2 normal
Assigned To: unbound team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-12 23:16 CEST by Greg A. Woods
Modified: 2008-08-27 13:32 CEST (History)
1 user (show)

See Also:


Attachments
be (much) more careful when writing boolean logic expressions! (811 bytes, patch)
2008-08-12 23:16 CEST, Greg A. Woods
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg A. Woods 2008-08-12 23:16:07 CEST
Created attachment 77 [details]
be (much) more careful when writing boolean logic expressions!

in 1.0.2 (someone needs to update bugzilla to know about 1.0.2)

When USE_INET6 is defined do_ip6 is forced to zero, as it should be.

However this causes the botched logic used to check if do_auto is valid to fail.

(manually setting do-ip4 or do-ip6 to no/off in the config file should have the same effect).

also the warning message given when do-ip4 and do-ip6 are both off is poorly worded.
Comment 1 Wouter Wijngaards 2008-08-13 08:08:59 CEST
Thank you for reading the file and commenting.

But, this is really what I meant.
do-auto needs Ipv6.
It uses IPv6 socket options.
And uses ip4to6 mapping to handle ipv4.

So, if one of ip4 or ip6 is disabled, it cannot work.

So, the code is what I meant to write, obviously, you found some trouble, otherwise there would be no bug entry.
What is going wrong for you? 

USE_INET6 is defined? That means that IPv6 exists and is fine? So do-ip6 is forced on?

Regards, Wouter
Comment 2 Wouter Wijngaards 2008-08-13 08:12:16 CEST
Changed log message to:
interface_automatic option does not work when either do-ip4 or do-ip6 is not enabled. Disabling option.
Which is better. Anyway, tell me about your trouble.
Comment 3 Wouter Wijngaards 2008-08-27 13:32:38 CEST
logic is fine, error message has been improved, closing bug.
   Wouter