Bug 1779 - Vista - GetLocalIPAddress Fails
: Vista - GetLocalIPAddress Fails
Status: RESOLVED FIXED
: Virtual Venues Client Software
Client UI
: 3.1
: PC other
: P2 major (vote)
: 3.2
Assigned To:
:
:
:
  Show dependency treegraph
 
Reported: 2008-03-12 10:29 by
Modified: 2008-07-16 15:21 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-03-12 10:29:15
It appears that  'GetLocalIPAddress' in
AccessGrid3\AccessGrid\Platform\win32\Config.py no longer parses the route
command that Vista (at least) generates.  It fails on two counts.

First (on or around line 453) it fails to check for len(parts)>0, so we get an
index out of range when it hits a blank line.  Second, if it hits a 'Persistent
Route' line, it will match the  'if parts[0] == "0.0.0.0": conditional - but
again fail with an index out of range when trying to assign metric=parts[4]
(there is no parts[4] on a Persistent route).  Once we hit the Persistent
Routes section, I don't believe there is any usable info after that, so as a
fix I 'break' when I hit that key word.

I've just hacked my end to work but adding:

...
parts = l.strip().split()

if len(parts) == 0:
   continue
if parts[0] == "Persistent":
   break
if parts[0] == "0.0.0.0"
...
------- Comment #1 From 2008-03-13 12:47:54 -------
Sorry - saw it was marked as blocker... changed it to Major.
------- Comment #2 From 2008-04-08 17:18:29 -------
Can you paste the full output of 'route print' on Vista as a reference?
------- Comment #3 From 2008-04-09 10:40:48 -------
Unfortunately, I only have access to one Vista machine - Brian's laptop.  And,
it appears the persistant route is no longer listed; however there are still
the blank lines that cause the code to fail without the len(parts)==0 check.  I
assume that just doing a 'route -p add' will add a persistent route, but can't
guarantee it will be listed the same as what caused the original problem since
I think you _can_ have a metric on a persistent route. 


C:\Users\bcorrie.PRISM>route print
===========================================================================
Interface List
  9 ...00 1d e0 00 71 09 ...... Intel(R) Wireless WiFi Link 4965AGN
  8 ...00 1c 23 19 47 c6 ...... Broadcom NetXtreme 57xx Gigabit Controller
  1 ........................... Software Loopback Interface 1
 10 ...02 00 54 55 4e 01 ...... Teredo Tunneling Pseudo-Interface
 18 ...00 00 00 00 00 00 00 e0  Microsoft ISATAP Adapter
 24 ...00 00 00 00 00 00 00 e0  Microsoft 6to4 Adapter
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0     142.58.53.62     142.58.53.60     25
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
     142.58.53.32  255.255.255.224         On-link      142.58.53.60    281
     142.58.53.60  255.255.255.255         On-link      142.58.53.60    281
     142.58.53.63  255.255.255.255         On-link      142.58.53.60    281
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link      142.58.53.60    281
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link      142.58.53.60    281
===========================================================================
Persistent Routes:
  None

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
 24   1130 ::/0                     2002:c058:6301::c058:6301
  1    306 ::1/128                  On-link
 10     18 2001::/32                On-link
 10    266 2001:0:4137:9e50:2865:1e36:71c5:cac3/128
                                    On-link
 24   1030 2002::/16                On-link
 24    286 2002:8e3a:353c::8e3a:353c/128
                                    On-link
 10    266 fe80::/64                On-link
 18    276 fe80::200:5efe:142.58.53.60/128
                                    On-link
 10    266 fe80::2865:1e36:71c5:cac3/128
                                    On-link
  1    306 ff00::/8                 On-link
 10    266 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None 
------- Comment #4 From 2008-07-16 15:21:55 -------
This fix has been committed for the 3.2 beta release.