summaryrefslogtreecommitdiffstats
path: root/source4/libcli/resolve/dns_ex.c
Commit message (Collapse)AuthorAgeFilesLines
* addns: Remove support for dns_host_file.Andreas Schneider2014-12-181-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli: Fix a typoVolker Lendecke2014-07-311-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* Fallback to the internal resolver on EAI_FAIL.Landon Fuller2013-02-171-1/+3
| | | | | | | | | | | | | | | | | On Linux, non-RFC 1034-complaint names (such as gc._msdsc.example.org) will result in the resolver returning the non-POSIX EAI_NODATA. In that case, the case statement here would fall back on the internal resolver, allowing resolution to complete successfully. On FreeBSD, the libc resolver uses the same validation code, but the POSIX result of EAI_FAIL is returned instead of EAI_NODATA. Since there was no case for this error code, no fallback to the internal resolver would occur. This led to replication failing on FreeBSD. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sun Feb 17 07:06:36 CET 2013 on sn-devel-104
* s4-resolve: Fix parsing of IPv6/AAAA in dns_lookup (bug #9555)Arvid Requate2013-01-121-0/+1
| | | | Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dns: fix comments and make s4/libcli/resolve dns resolver workingAlexander Bokovoy2012-05-231-1/+1
| | | | | | | | After migrating to use libaddns, reply_to_addrs() needed to change the way answers are iterated through. Originally libroken implementation gave all answers as separate records with last one being explicitly NULL. libaddns unmarshalling code gives all non-NULL answers and should be iterated with explicit reply->num_answers in use.
* s4-resolve: Remove dependency on librokenSimo Sorce2012-05-231-197/+152
| | | | Use available native samba resolver functions
* s4-resolv: fix dns_ex so as to fail correctly when a name does not existAndrew Bartlett2011-12-141-0/+9
| | | | | | | | | | | | | Without this, netbios name lookups do not work, as we never fall back to them. This caused segfaults from e38d97e0424f7e5b21c8b7ac0b1f1bac33f19d69 to 251209bd6f6e66ca9bcf28cd652d85d1cd729fdc and then name lookup failure or timeouts until this patch. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Dec 14 01:16:37 CET 2011 on sn-devel-104
* s4-resolver: do not use all the A and AAAA records, those after a NS are not ↵Matthieu Patou2011-12-051-0/+16
| | | | the one we want to use
* s4-resolver: fix bug with DNS servers returning AAAA records when asked for ↵Matthieu Patou2011-11-061-2/+4
| | | | | | | A records Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Sun Nov 6 03:18:00 CET 2011 on sn-devel-104
* s4-resolver: make it work back with ipv4 only DNS recordsMatthieu Patou2011-11-021-16/+25
| | | | | | | | It turns out that if there is no AAAA record the dns server (bind and MS windows at least) do not return the A record when just asked for AAAA. Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Wed Nov 2 11:15:34 CET 2011 on sn-devel-104
* s4-resolv: fix resolution of SRV records pointing to A and AAAA recordsMatthieu Patou2011-10-211-161/+238
|
* s4:libcli: use tevent_ fn names instead of legacy event_ onesSimo Sorce2011-08-131-1/+1
|
* libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbolAndrew Bartlett2011-06-201-2/+2
| | | | | | | | | | | | The two error tables need to be combined, but for now seperate the names. (As the common parts of the tree now use the _common function, errmap_unix.c must be included in the s3 autoconf build). Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
* s4-ipv6: fixed a crash in the IPv6 DNS codeAndrew Tridgell2011-06-071-1/+1
|
* s4-ipv6: fixed DNS handling with new IPv6 codeAndrew Tridgell2011-06-071-1/+16
|
* s4-ipv6: cope with IPv6 in our async DNS client codeAndrew Tridgell2011-06-061-28/+28
|
* do an explicit A record search for SRV entriesLuke Howard2011-05-131-4/+22
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4:libcli/resolve/dns_ex.c - fix "const" warningMatthias Dieter Wallnöfer2010-10-031-1/+2
|
* s4-dns: avoid search domains expansion in DNS resolverAndrew Tridgell2010-09-271-0/+8
| | | | add a '.' if the name contains a '.' already, but not at the end
* s4-dns: fixed lookup of SRV records using dns_exAndrew Tridgell2010-09-151-2/+2
| | | | Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-dns-ex: use autoclose on the dns child pipeAndrew Tridgell2010-03-051-2/+1
| | | | | | | I'm hoping this will fix an occasional segfault I've noticed where epoll still calls events on a closed fde Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4: Fix result check for getaddrinfo()Kamen Mazdrashki2010-01-061-6/+11
| | | | | | | | | I think this completes commit 50feca550eed7828198b7c0fc5f0e5ddc863313d. Now result should be handled correctly both for systems that support EAI_NODATA but returns EAI_NONAME (as my Ubuntu 9.x) and systems that doesn't support EAI_NODATA at all. Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s4/libcli: when we get a DNS lookup failure show the nameAndrew Tridgell2009-09-111-0/+2
| | | | | When tracking down complex connection problems its useful knowing what name lookups failed.
* s4:heimdal: import lorikeet-heimdal-200906080040 (commit ↵Andrew Bartlett2009-06-121-16/+16
| | | | | | | | | | | 904d0124b46eed7a8ad6e5b73e892ff34b6865ba) Also including the supporting changes required to pass make test A number of heimdal functions and constants have changed since we last imported a tree (for the better, but inconvenient for us). Andrew Bartlett
* s4:resolve/dns_ex: undefine class because it's used in ↵Stefan Metzmacher2009-02-021-0/+5
| | | | | | heimdal/lib/roken/resolve.h metze
* s4: simplify some overly-complicated logicTim Prouty2008-12-301-1/+1
|
* s4:lib/tevent: rename structsStefan Metzmacher2008-12-291-4/+4
| | | | | | | | | | | | | | | | | | | | list="" list="$list event_context:tevent_context" list="$list fd_event:tevent_fd" list="$list timed_event:tevent_timer" for s in $list; do o=`echo $s | cut -d ':' -f1` n=`echo $s | cut -d ':' -f2` r=`git grep "struct $o" |cut -d ':' -f1 |sort -u` files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4` for f in $files; do cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp mv $f.tmp $f done done metze
* s4: Fix a getaddrinfo/EAI_NODATA portability issueTim Prouty2008-12-221-0/+4
| | | | | | FreeBSD has explicitly deprecated EAI_NODATA as a return value from getaddrinfo by removing it from netdb.h. On systems that don't have EAI_NODATA, EAI_NONAME should be used instead.
* s4:libcli/replace: add some RESOLVE_NAME_FLAG* flagsStefan Metzmacher2008-12-181-16/+23
| | | | metze
* s4:libcli/resolve: specify the port for the resulting socket_addressesStefan Metzmacher2008-12-171-3/+8
| | | | metze
* s4:libcli/resolve: optionally return the name that belongs to the returned ↵Stefan Metzmacher2008-12-171-11/+44
| | | | | | | | address E.g. this helps for DNS CNAME and SRV results. metze
* s4:libcli/resolve: pass down flags to the resolver backendsStefan Metzmacher2008-12-171-0/+3
| | | | metze
* s4:libcli/resolve: add getaddrinfo()/dns_looup() resolvingStefan Metzmacher2008-12-171-0/+484
This "dns_ex" module provides flexible lookup methods for dns lookups. The getaddrinfo() part looks at /etc/hosts and dns. As it handles CNAME replies badly we fallback to use dns_lookup(name, "A"). The dns_lookup() makes DNS SRV lookups possible. This module is not a real resolve module, it's just a generic helper as the nbtlist.c code is. The next step will be that the "host" module will use the dns_ex.c code. metze