Closed Bug 43525 Opened 24 years ago Closed 22 years ago

crash when NetMotion is enabled due to 0.0.0.0 being opened.

Categories

(Core :: Networking, defect, P3)

x86
Windows 98
defect

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: michaelf, Assigned: darin.moz)

References

()

Details

(Keywords: crash, verifyme)

From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)
BuildID:    2000041805

When NetMotion is loaded and enabled Mozilla will fail because of an 
incompatability with opening the "Any" address, 0.0.0.0, with NetMotion.  
NetMotion is software which provides wireless roaming between subnets and 
session persistence.  This is done by routing packets through a server.  
Mozilla is opening 0.0.0.0 and then connecting to it via 127.0.0.1 during 
initialization.  127.0.0.1 is recognized as a loopback by NetMotion and that is 
not an issue.  Opening and listening on "Any" is,  as well as a potential 
security hole.  By changing the following code (IpAddrAny to IpAddrLoopback) we 
were able to recompile mozilla and run with NetMotion.

.\nsprpub\pr\src\io\prsocket.c

PR_IMPLEMENT(PRStatus) PR_NewTCPSocketPair(PRFileDesc *f[])
{
#ifdef XP_UNIX
    .
    .
    .
#elif defined(WINNT)
    .
    .
    .
#else /* not Unix or NT */
    /*
     * default implementation
     */
    PRFileDesc *listenSock;
    PRNetAddr selfAddr;
    PRUint16 port;

    f[0] = f[1] = NULL;
    listenSock = PR_NewTCPSocket();
    if (listenSock == NULL) {
        goto failed;
    }
    PR_InitializeNetAddr(PR_IpAddrAny, 0, &selfAddr);
    /* PR_InitializeNetAddr(PR_IpAddrLoopback, 0, &selfAddr); */
    if (PR_Bind(listenSock, &selfAddr) == PR_FAILURE) {
        goto failed;
    }
    if (PR_GetSockName(listenSock, &selfAddr) == PR_FAILURE) {
        goto failed;
    }
    port = ntohs(selfAddr.inet.port);
    if (PR_Listen(listenSock, 5) == PR_FAILURE) {
        goto failed;
    }
    f[0] = PR_NewTCPSocket();
    if (f[0] == NULL) {
        goto failed;
    }
    PR_InitializeNetAddr(PR_IpAddrLoopback, port, &selfAddr);

    /*
     * Only a thread is used to do the connect and accept.
     * I am relying on the fact that PR_Connect returns
     * successfully as soon as the connect request is put
     * into the listen queue (but before PR_Accept is called).
     * This is the behavior of the BSD socket code.  If
     * connect does not return until accept is called, we
     * will need to create another thread to call connect.
     */
    if (PR_Connect(f[0], &selfAddr, PR_INTERVAL_NO_TIMEOUT)
            == PR_FAILURE) {
        goto failed;
    }
    f[1] = PR_Accept(listenSock, NULL, PR_INTERVAL_NO_TIMEOUT);
    if (f[1] == NULL) {
        goto failed;
    }
    PR_Close(listenSock);
    return PR_SUCCESS;

failed:
    if (listenSock) {
        PR_Close(listenSock);
    }
    if (f[0]) {
        PR_Close(f[0]);
    }
    return PR_FAILURE;
#endif
}
addign crash keyword
Keywords: crash
This is fairly old, and you are using an ancient build... Nor does this list any
method to reproduce the bug, which in itself isn't too clear - it looks like a
proposed solution to some unclear problem... Please read the bug writing
guidelines at http://www.mozilla.org/quality/bug-writing-guidelines.htm
setting bug status to New
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → Future
reporter: please clarify.  thanks!
Keywords: verifyme
mass move, v2.
qa to me.
QA Contact: tever → benc
->darin
Assignee: gagan → darin
reporter: are you still seeing this bug in recent builds?
no response
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.