Setting a default route

15 views
Skip to first unread message

Daniel Baeyens

unread,
May 6, 2009, 11:45:11 AM5/6/09
to android...@googlegroups.com
Hi,

I'm trying to set up a default gateway through a network interface.
I've set up my device (netcfg <my_dev> up && ifconfig <my_dev> <ip>),
and then I have tried to:

route add default dev <my_dev>

If i launch "dumpstate", I can see the routes table, and indeed this
route is show, but if I try to make ping or a network connection, I
get a "Network is unreachable" error.

Am I doing something wrong? How could I do this?

Thank you!
Kind regards,
--
Daniel Baeyens
Warp Networks S.L. - http://www.warp.es

Daniel Baeyens

unread,
May 6, 2009, 1:54:09 PM5/6/09
to android...@googlegroups.com
Hi,

I've noticed that the route was not correctly set. Where all "route"
commands set this route with the destination netmask (Genmask) to
0.0.0.0, toolbox's route was setting the netmask as 255.255.255.255
which made the network unreachable.

Applying the attached patch, I have a working route, and now all the
traffic is correctly redirected through my network interface.

Is this patch crazy? Why it was written setting the netmask as if it
were for a specific host instead of a network?

If it's ok, I'll send it to gerrit to be included.

Kind regards,

001_toolbox_route_dev_to_networks.patch
Reply all
Reply to author
Forward
0 new messages