- /* Get host by address */
- if (!silc_net_gethostbyaddr(*ip, host, sizeof(host)))
- return FALSE;
+ /* Do reverse lookup if we want hostname too. */
+ if (hostname) {
+ /* Get host by address */
+ if (!silc_net_gethostbyaddr(*ip, host, sizeof(host)))
+ return FALSE;