Possible stub/forward zone bug

Hello,

I am facing with a weird issue, explained in a lot of detail here: https://forum.netgate.com/topic/150898/unbound-domain-overrides-stop-resolving-periodically-they-only-resume-after-the-service-has-been-restarted/4

but I will sum it up here as well:

I am running Unbound 1.10 inside a FreeBSD environment.
I use a local domain named test.local served by Bind and cached by Unbound.

Unbound is configured with:

domain-insecure: “test.local”
private-domain: “test.local”

I also tried configuring it as either a stub or a forward zone, it doesn’t matter as to the bug.

How to reproduce this:

  • Start unbound
  • resolve host1.test.local, host2.test.local, etc. all is fine
  • resolve blah.local , it fails after trying to go to root NS’s
  • try to resolve host1.test.local, host2.test.local , it fails this time with NXDOMAIN

If you restart Unbound, it will resolve test.local again, until you try and resolve a non-configured .local domain

If I add “local” as a forward zone that goes to my main NS, the issue goes away entirely.

Is this expected behavior or a bug ?

Thanks!