Bug 3830 - (int-91080) IP Routing Table Incorrectly configured for Wi-Fi with static address
(int-91080)
: IP Routing Table Incorrectly configured for Wi-Fi with static address
Status: RESOLVED FIXED
Product: Connectivity
WiFi
: 4.1.2 (4.2008.36-5)
: N810 Maemo
: Medium normal with 2 votes (vote)
: 4.1+
Assigned To: unassigned
: wifi-bugs
: http://lists.maemo.org/pipermail/maem...
:
:
:
  Show dependency tree
 
Reported: 2008-10-28 03:26 UTC by Elwyn davies
Modified: 2010-04-20 13:43 UTC (History)
3 users (show)

See Also:


Attachments


Note

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


Description Elwyn davies (reporter) 2008-10-28 03:26:22 UTC
SOFTWARE VERSION:
(Control Panel > General > About product)
Nokia N810 4.2008.36-5

STEPS TO REPRODUCE THE PROBLEM:
use the connectivity setup applet to configure Wi-Fi connectivity with a
statically assigned IP address and a specfic netmask.
Example (fictitious): 
IP address: 82.34.120.251
Netmask:    255.255.255.240
Gateway:    82.23.120.240

Make the connection to the specified network.  

The IP routing table will then be something like
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
82.0.0.0        *               255.0.0.0       U     0      0        0 wlan0
default         router.exampl.c 0.0.0.0         UG    0      0        0 wlan0 

EXPECTED OUTCOME:
The routing table ought to be
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
82.32.120.240    *              255.255.255.240 U     0      0        0 wlan0
default         router.exampl.c 0.0.0.0         UG    0      0        0 wlan0 

Addresses starting 82.x.y.z but outside the range 82.32.120.240 - 82.32.120.255
will be sent to the default gatway with this routing setup (desired outcome).

ACTUAL OUTCOME:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
82.0.0.0        *               255.0.0.0       U     0      0        0 wlan0
default         router.exampl.c 0.0.0.0         UG    0      0        0 wlan0 

Addresses starting 82.x.y.z but outside the range 82.32.120.240 - 82.32.120.255
will be blackholed with this routing setup (delivery in the local network will
be attempted and will fail).

REPRODUCIBILITY:
always

EXTRA SOFTWARE INSTALLED:
open-ssh-server/client to allow root access and remote shell for problem
diagnosis. Problem is not dependent on this installation.

OTHER COMMENTS:
The problem appears to be that the /etc/udhcpc/libicd_network_ipv4.script is
called from the connectivity applet is called as expected with the 'static'
parameter, but the 'subnet' environment variable is not set to the specified
netmask value.

This results in /sbin/ifconfig being called without a netmask parameter.
Accordingly ifconfig reverts to the 'archaic' classful behaviour and creates a
route for the attached network according to the 'class' of the specified 'ip'
address environment variable.

In the example above, 82.x.x.x would have been a Class A address, so ifconfig
assumes it is connected to a Class A network and creates a route for the
82.0.0.0 network with a 255.0.0.0 netmask.

The result is that the N810 assumes that any address in the 82.x.x.x range is
in the directly connected network.  Hence addresses outside the real range of
the connected network are effectively blackholed.  In the actual case that
provoked this report, I was trying to access non-local addresses that belonged
to the same ISP (and hence started with the same /8 prefix) but were not in my
local network.  In particular I could not reach my co-lo server in the ISP's
hsiting facility.

I confirmed that hard coding the appropriate netmask in the
libicd_network_ipv4.script resulted in the 'expected''behaviour.

I believe that the osso connectivity applet should call the script with the
subnet environment variable set - therefater all should be well. 

User-Agent:      Not Applicable.
Comment 1 Andre Klapper maemo.org 2008-10-29 13:13:01 UTC
Confirming, and thanks for the good investigation!

This will be fixed in libicd-network-ipv4 version 0.17 and later.

I'm going to close this as FIXED once I know which weekly build will contain
this fix.
Comment 2 Andre Klapper maemo.org 2008-11-07 13:19:04 UTC
Fixed in package
libicd-network-ipv4 0.17
which is part of the internal build version
diablo build x.2008.45 
(Note that 2008 is the year and the number after is the week.)

Any public update released with or after this build version will include the
fix.
Please verify that the new version fixes the bug by marking this bug report as
VERIFIED after the public update has been released and if you have some time.
Comment 3 Ralel 2010-04-19 21:32:16 UTC
We are in 2010 and there isn't a 2008.45 Diablo version, last is 2008.43. Where
can I get this update? I have the same netmask trouble when IP is fixed. 

(In reply to comment #2)
> Fixed in package
> libicd-network-ipv4 0.17
> which is part of the internal build version

> diablo build x.2008.45 
> (Note that 2008 is the year and the number after is the week.)
> 
> Any public update released with or after this build version will include the
> fix.
> Please verify that the new version fixes the bug by marking this bug report as
> VERIFIED after the public update has been released and if you have some time.
>
Comment 4 Andre Klapper maemo.org 2010-04-20 13:43:43 UTC
True. The last public version published by Nokia was 5.2008.43-7. Work
continued afterwards but this fix was never published for users. :-(