aboutsummaryrefslogtreecommitdiffstats
path: root/toolbox/route.c
diff options
context:
space:
mode:
authorDaniel Baeyens <daniel.baeyens@gmail.com>2009-10-07 00:53:32 +0200
committerDaniel Baeyens <daniel.baeyens@gmail.com>2010-04-21 01:51:18 +0200
commite898faddb3d5074a4489ce255927c6735b6f8b0d (patch)
tree6431f174a5e9b148ea0a19e5675b001f41e7f17f /toolbox/route.c
parent05f202a94bd7c51db10f041bde6006b4e719929e (diff)
downloadsystem_core-e898faddb3d5074a4489ce255927c6735b6f8b0d.tar.gz
system_core-e898faddb3d5074a4489ce255927c6735b6f8b0d.tar.bz2
system_core-e898faddb3d5074a4489ce255927c6735b6f8b0d.zip
Fix "route add default dev <iface>" behaviour
Previous behaviour was to set route's network mask as 255.255.255.255 Setting a destination network with netmask /32 blocks the connections just to the specified host. 0.0.0.0/32 defines the exact IPv4 address 0.0.0.0 and not the whole IPv4 hosts range. This patch allows traffic to any network, setting a 0.0.0.0/0 route. Change-Id: I1665f2fac52526337bb2c48e3b09564d9da448e7
Diffstat (limited to 'toolbox/route.c')
-rw-r--r--toolbox/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toolbox/route.c b/toolbox/route.c
index 4f66201b..107e48aa 100644
--- a/toolbox/route.c
+++ b/toolbox/route.c
@@ -61,7 +61,7 @@ int route_main(int argc, char *argv[])
if (!strcmp(argv[2], "default")) {
/* route add default dev wlan0 */
if (argc > 4 && !strcmp(argv[3], "dev")) {
- rt.rt_flags = RTF_UP | RTF_HOST;
+ rt.rt_flags = RTF_UP;
rt.rt_dev = argv[4];
errno = 0;
goto apply;