From c6bf4d9a59809fbb0c22ef9eb167c099ab8089fb Mon Sep 17 00:00:00 2001 From: David Voit Date: Wed, 3 Apr 2024 07:24:48 +0200 Subject: Implement CLDAP Ping to find the closest site 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) Reviewed-by: Jacob Shivers Signed-off-by: David Voit --- resolve_host.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'resolve_host.h') 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); -- cgit v1.2.3