[maemo-users] issue with incorrect IP routes being created

From: Elwyn Davies elwynd at folly.org.uk
Date: Tue Oct 28 02:25:22 EET 2008
Denis: Thanks for the comment.

I believe I have identified the problem .. see below.

Denis Dimick wrote:
> Have you tried hard coding an IP into the network settings?
Sorry if it wasn't clear:  The IP address *is* hard coded.  This seems 
to be the problem.
> It looks like maybe your WiFi network could be putting out dome bad IP 
> info, or the DHCP server serving up IP info.
DHCP isn't running at all (deliberately).

I finally identified the script (/etc/udhcpc/libicd_network_ipv4.script).
The script appears to be called as expected with 'static' as the first 
parameter and the various environment variables probably set as expected 
except that the subnet (netmask) parameter is not set when the script is 

As a result the ifconfig command is not passed a netmask parameter.  The 
ifconfig command inserts a route to the local network, and because no 
netmask is given it defaults to the archaic 'classful' behaviour.  In my 
case the address would have been a class A address and so it inserts a 
route to a Class A network with a mask.  Hardcoding the 
correct netmask into the script fixes the problem, but is obviously not 
the right answer. for the general case - the osso connectivity interface 
should set the subnet environment variable for the static case (I *did* 
set the right value in the user interface, honest).

I  will file a bug report.

Elwyn Davies

> HtH,
> Denis
> On Mon, Oct 27, 2008 at 3:54 PM, Elwyn Davies <elwynd at folly.org.uk 
> <mailto:elwynd at folly.org.uk>> wrote:
>     Hi.
>     I have connected my new Nokia N810 to my local wi-fi network.
>     It is mostly working fine except that it appears to have installed a
>     spurious route whish is effectively blackholing some traffic.
>     Details:
>     I have the N810 configured to use a static IP address for my local
>     wireless (wi-fi) network.  For the sake of argument let us say this is
> <> with a netmask of
> <>.  The gateway for this
>     network is <>.
>     The connectivity mechanism correctly generates a default route via
> <> for the wlan interface.
>     However it also generates another route to
>     <> with netmask <>.
>     Consequently all packets to addresses 11.x.y.z apart for the local
>     network are effectively blackholed.
>     The routing table is (anonymized) ..
>     Kernel IP routing table
>     Destination     Gateway         Genmask         Flags Metric Ref  
>      Use
>     Iface
> <>        *     
>     <>       U     0      0        0
>     wlan0
>     default         router.exampl.c <>        
>     UG    0      0        0
>     wlan0
>     This is clearly incorrect as the local network is not a /8.
>     Is this a bug in the udhcpc postconfig script when used woth a static
>     address?   I can't actually find this script to check.
>     Any help would be appreciated.
>     Regards,
>     Elwyn Davies
>     _______________________________________________
>     maemo-users mailing list
>     maemo-users at maemo.org <mailto:maemo-users at maemo.org>
>     https://lists.maemo.org/mailman/listinfo/maemo-users
> -- 
> --------------------------------------
> sik vis paw kem, para bellum
> --------------------------------------
> oderint dum metuant
> --------------------------------------
> "Our Country won't go on forever, if we stay soft as we are now. There 
> won't be any AMERICA because some foreign soldiery will invade us and 
> take our women and breed a hardier race!" -LT. GEN. LEWIS "CHESTY" 

More information about the maemo-users mailing list