[Bug 228850] [NEW] firefox wpad.dat report incorrect myIpAddress()

Ashwin cybernytrix at yahoo.com
Fri May 9 23:25:15 UTC 2008


Public bug reported:

Binary package hint: firefox

I have a wpad.dat that tries to detect the network based on the myAddress() javascript API specified by wpad standards. It works in windows firefox (and even in IE!). It does not do so in Ubuntu. 
The problem is that /etc/hosts lists mymachine.domain.com as 127.0.1.1 and firefox picks up the address from there for myAddress() calls.
I am connected over eth0 and the address is configured correctly. I can access local websites (the internet if I manually configure the proxy)

Test wpad.dat:
function FindProxyForURL(url, host) 

{

     alert("address:" + myAddress());    // expect 157.254.x.y but got 127.0.1.1
    // Direct access

    if (
isPlainHostName(host) ||

        shExpMatch(host, "157.254.*") )

    {

        alert(host + ":DIRECT");

        return "DIRECT";

    }


    // Are we inside the jail?????

    if (isInNet(myIpAddress(), "157.254.120.0", "255.255.255.0") ) {


        alert(host + ":PRIN");

        return "PROXY thebadproxy.domain.com:80";


    }


    // we are in the free world!

    alert(host + ":FREE");

    return "DIRECT";

}

I understand that the /etc/hosts entry is needed (if network is down
etc).

Firefox must pick the address from the interface used in the default
route and not by trying to look up mymachine.domain.com. Even if it
looks up mymachine.domain.com, it should be a DNS lookup and not from
/etc/hosts.

Hope to see this pushed upstream and eventually fixed. There several
reports from people not able to access the internet by using automatic
proxy configuration. It is because of this.

** Affects: firefox (Ubuntu)
     Importance: Undecided
         Status: New

-- 
firefox wpad.dat report incorrect myIpAddress()
https://bugs.launchpad.net/bugs/228850
You received this bug notification because you are a member of Mozilla
Bugs, which is subscribed to firefox in ubuntu.




More information about the Ubuntu-mozillateam-bugs mailing list