Dies schrieb Jo-Philipp Wich ([email protected]): > I'd suggest to use "ip route list exact 0.0.0.0/0" to find the device > and then the find_config() shell function to map the device to an uci > interface name.
Just a remark: It is possible that this command does not return a default route even if one is present. One of my openwrt devices uses advanced and asymmetric routing, requiring that the default route is not configured in the default routing table, but in a separate one: [email protected]'s password: root@atto:~# ip route list exact 0.0.0.0/0 root@atto:~# ip rule 0: from all lookup local 100: from all lookup main 105: from all fwmark 0xa lookup tunnel.gw 110: from all lookup ppp.gw 32766: from all lookup main 32767: from all lookup default root@atto:~# ip route list exact 0.0.0.0/0 table ppp.gw default dev ppp0 scope link root@atto:~# ip route list exact 0.0.0.0/0 table tunnel.gw default dev tun0 scope link _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
