3 @@ -1697,6 +1697,9 @@ int sifdefaultroute (int unit, u_int32_t
4 memset (&rt, 0, sizeof (rt));
5 SET_SA_FAMILY (rt.rt_dst, AF_INET);
7 + SET_SA_FAMILY(rt.rt_gateway, AF_INET);
8 + SIN_ADDR(rt.rt_gateway) = gateway;
12 if (kernel_version > KVERSION(2,1,0)) {
13 @@ -1704,7 +1707,7 @@ int sifdefaultroute (int unit, u_int32_t
14 SIN_ADDR(rt.rt_genmask) = 0L;
17 - rt.rt_flags = RTF_UP;
18 + rt.rt_flags = RTF_UP | RTF_GATEWAY;
19 if (ioctl(sock_fd, SIOCADDRT, &rt) < 0) {
21 error("default route ioctl(SIOCADDRT): %m");