diff options
author | Daniel Mack <github@zonque.org> | 2015-11-26 10:56:42 +0100 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-11-26 10:56:42 +0100 |
commit | 845f09c86ee1bacea63d926b3e33f3a0c7c354b3 (patch) | |
tree | bd6b36e01913d7cd2de1b1b8c14f58e7f1df4b85 /src/resolve/resolved-bus.c | |
parent | 30e07c7dbc5aa8e10e2f0d2a8d9cf7423835a8b4 (diff) | |
parent | 95d46fcaa4f27bc5e675e8de39ab3acc4732e39b (diff) |
Merge pull request #2034 from teg/resolved-fix
minor resolved fixes
Diffstat (limited to 'src/resolve/resolved-bus.c')
-rw-r--r-- | src/resolve/resolved-bus.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c index a43aa59cc0..da1b5014bf 100644 --- a/src/resolve/resolved-bus.c +++ b/src/resolve/resolved-bus.c @@ -298,7 +298,15 @@ static void bus_method_resolve_address_complete(DnsQuery *q) { goto finish; } - /* We don't process CNAME for PTR lookups. */ + r = dns_query_process_cname(q); + if (r == -ELOOP) { + r = sd_bus_reply_method_errorf(q->request, BUS_ERROR_CNAME_LOOP, "CNAME loop detected, or CNAME resolving disabled on '%s'", dns_question_name(q->question)); + goto finish; + } + if (r < 0) + goto finish; + if (r > 0) /* This was a cname, and the query was restarted. */ + return; r = sd_bus_message_new_method_return(q->request, &reply); if (r < 0) |