Commit Diff


commit - e4e1595bffdb6c43cd163ae576ee9715b859e494
commit + 160f5725a6646d432f70fe8b677ffdbcbdeb02ce
blob - ff40b8d523cd10853e69353d283abeabcb86d2d9
blob + 9b17af9cb202209b4b5e79c53c50d316a2df3105
--- src/ngircd/resolve.c
+++ src/ngircd/resolve.c
@@ -380,7 +380,7 @@ Do_ResolveAddr(const ng_ipaddr_t *Addr, int identsock,
 	if (!ReverseLookup(Addr, hostname, sizeof(hostname)))
 		goto dns_done;
 
-	if (ForwardLookup(hostname, &resolved_addr, AF_UNSPEC)) {
+	if (ForwardLookup(hostname, &resolved_addr, ng_ipaddr_af(Addr))) {
 		if (!Addr_in_list(&resolved_addr, Addr)) {
 			Log_Forgery_WrongIP(tmp_ip_str, hostname);
 			strlcpy(hostname, tmp_ip_str, sizeof(hostname));