skynetservices/skydns — pull request #90 by adieu (2014-04-24 12:42:42+00:00)
Title: Handle CNAME response pointing to skydns managed domain

When one domain name like `service.domain.com` is set as CNAME to `service.env.domain.local` and `domain.local` is managed by skydns, we should query skydns for the A records for `service.env.domain.local` and return the proper result.

Currently, we don't check result coming back from forwarded dns requests so we could not use CNAME to point one domain name to a skydns managed domain name.

This patch is just a simple copy & paste from ServeDNS function to ServeDNSForward function, we may need to rewrite both of the functions to remove the duplicate code.