Bug 12251

Summary: Whois broken for IP address queries
Product: Busybox Reporter: fortuna
Component: NetworkingAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.28.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description fortuna 2019-10-01 12:22:12 UTC
Without this code on lines 79 to 91:

    if (!success && !pfx[0]) {
        /*
         * Looking at /etc/jwhois.conf, some whois servers use
         * "domain = DOMAIN", "DOMAIN ID <DOMAIN>"
         * and "domain=DOMAIN_WITHOUT_LAST_COMPONENT"
         * formats, but those are rare.
         * (There are a few even more contrived ones.)
         * We are trying only "domain DOMAIN", the typical one.
         */
        pfx = "domain ";
        bufpos = 0;
        goto again;
    }

whois.c starts working for IP address queries without affecting domain name queries as the user can specify this prefix on the command line.