Bug 10164 - (int172925/int-179094) DHCP assigned netmask 255.255.255.255 results in no routes
(int172925/int-179094)
: DHCP assigned netmask 255.255.255.255 results in no routes
Status: RESOLVED FIXED
Product: Connectivity
Networking
: 5.0/(3.2010.02-8)
: N900 Maemo
: Unspecified major (vote)
: Harmattan
Assigned To: unassigned
: networking-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2010-05-12 18:50 UTC by george
Modified: 2010-08-20 18:59 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 george (reporter) 2010-05-12 18:50:01 UTC
SOFTWARE VERSION:
(Settings > General > About product)

EXACT STEPS LEADING TO PROBLEM: 

1. Turn Wi-Fi to connect to a public Wi-Fi network at work with multiple APs
and web filtering transparent proxy. 
2. Device connects to network with DHCP assigned IP address, gateway, netmask
and dns server. /var/run/dhcp-params.conf shows - wlan0 10.22.2.10 10.22.2.254
255.255.255.255 firstspot.com 172.28....(dns sever IP), ifconfig shows IP
address 10.22.2.10, iwconfig shows that wlan0 is associated with an AP and the
correct essid, route does not show any configured routes.
3. Trying to go to a website does not go anywhere, "Personal IP Address" does
not show an IP like the device is not connected to a network. 
4. route add default gw 10.22.2.254 wlan0 gives "SIOCADDRT Network is
unreachable"
5. Changing manually netmask to 255.255.255.0 allows the above manual route
command to add the gateway and resolves the issue. N900 connects fine (web,
skype, pidgin, ssh, etc), except that "Personal IP Address" does not show IP
address.
5. The device connects fine with all other public Wi-Fi networks I've tested.
6. Windows and Ubuntu laptops connect fine with this same network at work. The
network is open and redirects first web request to a web page which asks for a
name and requests checking a box indicating that users agree with the policy of
the organization. On Ubuntu and Windows laptops the netmask being
255.255.255.255 does not prevent network scripts from assigning appropriate
routes. 


EXPECTED OUTCOME:
=======================
Nokia-N900-51-1:/# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.22.2.254     0.0.0.0         UG    10     0        0 wlan0
Nokia-N900-51-1:/#


ACTUAL OUTCOME:
=======================
Nokia-N900-51-1:/# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

Nokia-N900-51-1:/#


REPRODUCIBILITY:
always - my wife's N900 experiences the same problem

EXTRA SOFTWARE INSTALLED:

OTHER COMMENTS:

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.9)
Gecko/20100315 Firefox/3.5.9 (.NET CLR 3.5.30729)
Comment 1 Lucas Maneos 2010-05-13 11:00:51 UTC
(In reply to comment #0)
> /var/run/dhcp-params.conf shows - wlan0 10.22.2.10 10.22.2.254
> 255.255.255.255 firstspot.com 172.28....(dns sever IP)
> [...]
> 4. route add default gw 10.22.2.254 wlan0 gives "SIOCADDRT Network is
> unreachable"
> 5. Changing manually netmask to 255.255.255.0 allows the above manual route
> command to add the gateway and resolves the issue.

True, 10.22.2.10/32 has no route to 10.22.2.254.  The netmask would need to be
at least /24 for this to work.

The usual way to handle such point-to-point connections is to add an explicit
host route to the gateway first.  Diablo does this (in
/etc/udhcpc/libicd_network_ipv4.script) but apparently that code has been
removed from the Fremantle version (/etc/maemo-dhcp.d/50_ipv4_network_setup).

I don't have a way to view that currently, but there's enough of the relevant
parts in the patch attached to bug 9662 (a similar regression).  Still, without
having the full picture I will leave it to Andre to confirm.
Comment 2 george (reporter) 2010-05-18 00:43:56 UTC
(In reply to comment #1) 

So, what's next, Lucas? Is this thing (bug or a regression) going to die, or
somebody is going to look into it? It should not be difficult for somebody who
knows the system to change network setup scripts. I've looked at bug 9662 and
the proposed patch. My Nokia does not have the patch utility, so I've patched
/etc/maemo-dhcp.d/50_ipv4_network_setup file with the proposed patch on a
different linux machine. It was unsuccessful, as it turned out that the
original file had already the changes contained in the patch. I am afraid to
start changing things, because I know just enough to brick my N900. Meanwhile
my colleagues are connecting to the same network without problems with their
I-phones. Can you send me the original Diablo
/etc/udhcpc/libicd_network_ipv4.script?

Thank you for looking into this! g:)
Comment 3 Andre Klapper maemo.org 2010-05-20 14:26:32 UTC
(George: Please do not reset priority. Thank you!)
Comment 4 Lucas Maneos 2010-06-13 22:29:41 UTC
(In reply to comment #2)
> So, what's next, Lucas? Is this thing (bug or a regression) going to die, or
> somebody is going to look into it?

(Sorry for the long delay)  Yes, Andre has imported it into the internal Nokia
bugtracker (the int-172925 alias signifies this) and hopefully it will be
looked at.

> Can you send me the original Diablo /etc/udhcpc/libicd_network_ipv4.script?

The script comes from a closed-source package (libicd-network-ipv4) so I'm
afraid I can't re-distribute it (I know it's silly, but better safe than
sorry).   However the gist of it is: if the route command trying to add the
default route failed, add a host route to the gateway on the same interface and
try again.

(FWIW I think this particular network configuration is broken, but since other
OSes accept and work around the brokedness it seems it's here to stay...)
Comment 5 Andre Klapper maemo.org 2010-08-20 18:59:18 UTC
FIXED for Harmattan (the version after Maemo5).
Still no feedback from Nokia about backporting the patch to Maemo5 yet.