The BIND9 wildcard address is not handled properly.
The issue was reported on our mailing list.
The BIND 9 control channel allows the wildcard address ("*") to be specified and listened to on all interfaces. Example:
controls {
inet * allow { localhost; };
};
In this case, the Stork agent should connect to BIND 9 over the localhost address. We have a dedicated condition for it in the function that parses the BIND 9 configuration (parseInetSpec
- backend/agent/bind9.go:271-273
):
if address == "*" {
address = "localhost"
}
So, it should work, but it doesn't. The Stork agent tries to establish a connection to the 0.0.0.0
address, and it fails.
The Stork agent doesn't read the BIND 9 configuration directly. Instead, it calls the named-checkconf
command, which combines the main config file and all references into a single output. This command seems to also resolve the wildcard symbol to 0.0.0.0
.
The original named.conf
entry:
controls {
inet * allow { localhost; };
};
The named-checkconf
output:
controls {
inet 0.0.0.0 allow {
"localhost";
};
};
We need to handle this case properly. Tested on BIND 9.18.