[OpenWrt-Devel] netifd: need help to fix FS#1463 - route with gateway absent or

Luiz Angelo Daros de Luca luizluca at gmail.com
Thu Sep 6 16:53:17 EDT 2018


Docs are clear that when a route does not have the gateway field, it
will use the one from interface. However, it does not work like that.
When a route does not have a gateway, it is added as an onlink route.

I added a flag to differ between '' and when gateway is absent.
The problem now is to get interface gateway. It looks like
interface_set_route_info is the place where a route copy missing
information from interface. However, at the time it runs, at least for
proto dhcp, iface->proto_ip->route and iface->config_ip->route are
empty. When interface gets an address from DHCP,
proto_shell_parse_route_list is called to add the default route.

Shouldn't the interface routes be included only after the interface is
up and configured (proto_shell_update_link) and not from the config
init (config_init_routes)?

My WIP is here

     Luiz Angelo Daros de Luca
            luizluca at gmail.com

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list