Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e898fadd authored by Daniel Baeyens's avatar Daniel Baeyens
Browse files

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
parent 05f202a9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;