sunzhenguo / pacparser

Automatically exported from code.google.com/p/pacparser
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Build tests fail for hosts on 192.* and 10.10.* networks #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Tests don't run successfully on some hosts in 192.* and 10.10.* networks. 

Tests run successfully on some hosts in the given networks because myIpAddress 
returns the loopback address 127.0.0.1 on theses hosts.

Original issue reported on code.google.com by manugarg on 7 Dec 2010 at 5:48

GoogleCodeExporter commented 9 years ago
Consider this in tests/proxy.pac:
..
  if (isInNet(myIpAddress(), '192.0.0.0', '255.0.0.0'))
    return '192.0.0.0';

  if (isInNet(myIpAddress(), '10.10.0.0', '255.255.0.0'))
    return '10.10.0.0';

  else
    return "END-OF-SCRIPT";
...

Test script expect to match END-OF-SCRIPT when local ip address is not set to 
'192.168.101.1' using '-c' flag. This obviously fails for hosts on 192.168.0.0 
networks.

Original comment by manugarg on 7 Dec 2010 at 5:52

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This change should fix it:

http://goo.gl/D0ZwK

This is still in dev clone though. I'll merge changes from the dev clone to 
main branch tomorrow and cut a release soon.

Original comment by manugarg on 7 Dec 2010 at 6:01

GoogleCodeExporter commented 9 years ago
I have just cut a new release (1.2.7) which includes the fix for this bug.

Original comment by manugarg on 13 Dec 2010 at 7:38

GoogleCodeExporter commented 9 years ago

Original comment by manugarg on 13 Dec 2010 at 8:48