source: branches/backfire/package/ppp/patches/340-populate_default_gateway.patch @ 22951

Last change on this file since 22951 was 22951, checked in by jow, 6 years ago

[backfire] merge r22806

File size: 639 bytes
  • pppd/sys-linux.c

    a b int sifdefaultroute (int unit, u_int32_t 
    16731673    memset (&rt, 0, sizeof (rt)); 
    16741674    SET_SA_FAMILY (rt.rt_dst, AF_INET); 
    16751675 
     1676    SET_SA_FAMILY(rt.rt_gateway, AF_INET); 
     1677    SIN_ADDR(rt.rt_gateway) = gateway; 
     1678 
    16761679    rt.rt_dev = ifname; 
    16771680 
    16781681    if (kernel_version > KVERSION(2,1,0)) { 
    int sifdefaultroute (int unit, u_int32_t 
    16801683        SIN_ADDR(rt.rt_genmask) = 0L; 
    16811684    } 
    16821685 
    1683     rt.rt_flags = RTF_UP; 
     1686    rt.rt_flags = RTF_UP | RTF_GATEWAY; 
    16841687    if (ioctl(sock_fd, SIOCADDRT, &rt) < 0) { 
    16851688        if (!ok_error(errno)) 
    16861689            error("default route ioctl(SIOCADDRT): %m"); 
Note: See TracBrowser for help on using the repository browser.