• Carl-Magnus Björkell's avatar
    plugin/etcd: Filter empty host field by qtype (#2499) · a84c26d7
    Carl-Magnus Björkell authored
    When a query, different from a TXT lookup is performed, all services
    with a missing `Host` field should be filtered out, as these otherwize
    cause a line in the answer section with a single dot (`.`) as the
    result. This behavior manifests for example when a TXT record is present
    on a domain, eg. an A or SRV lookup is performed on said domain.
    
    If there are no services containing a `Host` field, a `NODATA` response
    should be given. If there are other Services, these alone should be
    returned for the query.
    
    Filter any service that has an empty Host field from all lookup types
    other than TXT to solve this issue. At the same time the check for empty
    `Text` fields in TXT queries are also moved to the same check in the
    etcd ServiceBackend.
    a84c26d7
cname_test.go 3.02 KB