FQDN support is incomplete (does not allow partial names)
Per RFC 4704 section 4.2:
A client MAY be configured with a fully qualified domain name or with a partial name that is not fully qualified. If a client knows only part of its name, it MAY send a name that is not fully qualified, indicating that it knows part of the name but does not necessarily know the zone in which the name is to be embedded.
To send a fully qualified domain name, the Domain Name field is set to the DNS-encoded domain name including the terminating zero-length label. To send a partial name, the Domain Name field is set to the DNS-encoded domain name without the terminating zero-length label.
fqdn_encode function unconditionally adds the terminating zero-length label here. This means that if they do not know the domain name, then it is impossible for clients to request that the AAAA and PTR records be updated in a compliant way.
Looking at the code, since this function is part of
common/options.c, it seems that there is an issue determining whether the logic is being invoked by a client or a server (since only the client may provide a partial name). This field is currently populated with the
fqdn.fqdn config option. Maybe another option
fqdn.partial_name) could be added. If
fqdn.fqdn is empty but
fqdn.host_name is not, then the encoding logic would omit the terminating zero-length label.
I'm not too familiar with the code base, though, so maybe that's not a practical suggestion.