-
Notifications
You must be signed in to change notification settings - Fork 380
Closed
Description
Description
When a configuration is provided with a zone and a hostname that is not identical to the zone, the updater fails. This issue was introduced with the implementation of the dnsexit provider, due to a misunderstanding of how the dnsexit API expects updates for 'subdomains'. This bug has been confirmed via the report here: opnsense/plugins
Steps to reproduce
- Provide a configuration with a zone and a hostname that is not identical to the zone.
- Run the updater.
Expected behavior
The updater should produce the following JSON call for host host1.myroot.publicvm.com on zone myroot.publicvm.com:
{
"domain":"myroot.publicvm.com",
"apikey":"myApiKey"
"update":
[{
"ttl":5,
"type":"A",
"content":"1.2.3.4",
"name":"host1"
}]
}Actual behavior
Currently, the name field is identical to the full hostname, which does not work.
Note that for calls with identical name and zone, this does work, as does an empty name with a zone that contains a root hostname (i.e. myroot.publicvm.com)
Proposed solution
The issue can be fixed by:
- Only providing the 'hostname' part on the name field in the update block, by trimming it from the zone (if provided).
- Ensuring that this fix does not break other use cases (simple hostname only, without zone, hostname and zone being equal). Also handling ipv4 and ipv6 which must be done in a single call.
I will propose a solution shortly.
Metadata
Metadata
Assignees
Labels
No labels