crash when NetMotion is enabled due to 0.0.0.0 being opened.

RESOLVED WORKSFORME

Status

()

Core
Networking
P3
critical
RESOLVED WORKSFORME
18 years ago
16 years ago

People

(Reporter: Michael P. Frank, Assigned: Darin Fisher)

Tracking

({crash, verifyme})

Trunk
Future
x86
Windows 98
crash, verifyme
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

18 years ago
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
}

Comment 1

18 years ago
addign crash keyword
Keywords: crash

Comment 2

18 years ago
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

Comment 3

18 years ago
setting bug status to New
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

18 years ago
Target Milestone: --- → Future
(Assignee)

Comment 4

18 years ago
reporter: please clarify.  thanks!

Updated

18 years ago
Keywords: verifyme

Comment 5

17 years ago
mass move, v2.
qa to me.
QA Contact: tever → benc

Comment 6

17 years ago
->darin
Assignee: gagan → darin
(Assignee)

Comment 7

17 years ago
reporter: are you still seeing this bug in recent builds?
no response
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.