|
@@ -12,14 +12,20 @@ int resolv ( struct in_addr *address, const char *name ) {
|
12
|
12
|
struct resolver *resolver;
|
13
|
13
|
|
14
|
14
|
/* Check for a dotted quad IP address first */
|
15
|
|
- if ( inet_aton ( name, address ) )
|
|
15
|
+ if ( inet_aton ( name, address ) ) {
|
|
16
|
+ DBG ( "RESOLV saw valid IP address %s\n", name );
|
16
|
17
|
return 1;
|
|
18
|
+ }
|
17
|
19
|
|
18
|
20
|
/* Try any compiled-in name resolution modules */
|
19
|
21
|
for ( resolver = resolvers ; resolver < resolvers_end ; resolver++ ) {
|
20
|
|
- if ( resolver->resolv ( address, name ) )
|
|
22
|
+ if ( resolver->resolv ( address, name ) ) {
|
|
23
|
+ DBG ( "RESOLV resolved \"%s\" to %@ using %s\n",
|
|
24
|
+ name, address->s_addr, resolver->name );
|
21
|
25
|
return 1;
|
|
26
|
+ }
|
22
|
27
|
}
|
23
|
28
|
|
|
29
|
+ DBG ( "RESOLV failed to resolve %s\n", name );
|
24
|
30
|
return 0;
|
25
|
31
|
}
|