diff options
author | 2013-06-01 14:34:34 +0000 | |
---|---|---|
committer | 2013-06-01 14:34:34 +0000 | |
commit | 6a7a3d640d39dae50928bded135d5992d31570e3 (patch) | |
tree | 41c24fdd34b567f9bcc10dcfb95016c9625e943f /lib/libc/asr/asr.c | |
parent | Make 'kill-paragraph' behave like emacs. ok florian@ (diff) | |
download | wireguard-openbsd-6a7a3d640d39dae50928bded135d5992d31570e3.tar.xz wireguard-openbsd-6a7a3d640d39dae50928bded135d5992d31570e3.zip |
Make hostaliases work for gethostbyname() and getaddrinfo() when
looking into /etc/hosts. Remove the alias check from the search
domain iteration. Instead, take a shortcut to res_query_async_ctx() in
res_search_async_ctx().
Diffstat (limited to 'lib/libc/asr/asr.c')
-rw-r--r-- | lib/libc/asr/asr.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/lib/libc/asr/asr.c b/lib/libc/asr/asr.c index 3260f6a9f58..3ae36fb9895 100644 --- a/lib/libc/asr/asr.c +++ b/lib/libc/asr/asr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asr.c,v 1.28 2013/06/01 12:38:29 eric Exp $ */ +/* $OpenBSD: asr.c,v 1.29 2013/06/01 14:34:34 eric Exp $ */ /* * Copyright (c) 2010-2012 Eric Faurot <eric@openbsd.org> * @@ -937,10 +937,6 @@ enum { int asr_iter_domain(struct async *as, const char *name, char * buf, size_t len) { -#if ASR_OPT_HOSTALIASES - char *alias; -#endif - switch (as->as_dom_step) { case DOM_INIT: @@ -957,21 +953,6 @@ asr_iter_domain(struct async *as, const char *name, char * buf, size_t len) return (asr_domcat(name, NULL, buf, len)); } -#if ASR_OPT_HOSTALIASES - /* - * If "name" has no dots, it might be an alias. If so, - * That's also the only result. - */ - alias = asr_hostalias(as->as_ctx, name, buf, len); - if (alias) { - DPRINT("asr: asr_iter_domain(\"%s\") is alias \"%s\"\n", - name, alias); - as->as_dom_flags |= ASYNC_DOM_HOSTALIAS; - as->as_dom_step = DOM_DONE; - return (asr_domcat(alias, NULL, buf, len)); - } -#endif - /* * Otherwise, we iterate through the specified search domains. */ |