summaryrefslogtreecommitdiff
path: root/resolve_host.h
diff options
context:
space:
mode:
authorDavid Voit <david.voit@gmail.com>2024-04-03 07:24:48 +0200
committerPavel Shilovsky <pshilovsky@samba.org>2024-04-28 00:00:12 +0000
commitc6bf4d9a59809fbb0c22ef9eb167c099ab8089fb (patch)
tree9086346733731671d164c73131f1d3467d7022c6 /resolve_host.h
parent4718e09e4b15b957bf9d729793bc3de7caad8134 (diff)
downloadcifs-utils-for-next.tar.gz
cifs-utils-for-next.tar.bz2
cifs-utils-for-next.zip
Implement CLDAP Ping to find the closest sitefor-next
For domain based DFS we always need to contact the domain controllers. On setups, which are using bigger AD installations you could get random dc on the other side of the world, if you don't have site support. This can lead to network timeouts and other problems. CLDAP-Ping uses ASN.1 + UDP (CLDAP) and custom-DCE encoding including DName compressions without field separation. Finally after finding the sitename we now need to do a DNS SRV lookups to find the correct IPs to our closest site and fill up the remaining IPs from the global list. Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Reviewed-by: Jacob Shivers <jshivers@redhat.com> Signed-off-by: David Voit <david.voit@gmail.com>
Diffstat (limited to 'resolve_host.h')
-rw-r--r--resolve_host.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/resolve_host.h b/resolve_host.h
index b949245..f2b19e6 100644
--- a/resolve_host.h
+++ b/resolve_host.h
@@ -26,8 +26,10 @@
/* currently maximum length of IPv6 address string */
#define MAX_ADDRESS_LEN INET6_ADDRSTRLEN
-/* limit list of addresses to 16 max-size addrs */
-#define MAX_ADDR_LIST_LEN ((MAX_ADDRESS_LEN + 1) * 16)
+#define MAX_ADDRESSES 16
+
+/* limit list of addresses to MAX_ADDRESSES max-size addrs */
+#define MAX_ADDR_LIST_LEN ((MAX_ADDRESS_LEN + 1) * MAX_ADDRESSES)
extern int resolve_host(const char *host, char *addrstr);