Re: [OpenWrt-Devel] How to recognize if a default route is active

2011-04-15 Thread Philip Prindeville
On 4/14/11 4:11 AM, Roberto Riggio wrote: Il 14/04/2011 12:03, Jo-Philipp Wich ha scritto: 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. Thanks very much for the quick answer. I did not

Re: [OpenWrt-Devel] How to recognize if a default route is active

2011-04-14 Thread Jo-Philipp Wich
Hi, please do not do dirty hacks like relying on an interface called wan in your scripts. You should develop a hotplug handler which is invoked for ifup events on any interface. As soon as one interface appears which carries as 0/0 route, you have your wan. See the 6in4 and 6to4 packages for

Re: [OpenWrt-Devel] How to recognize if a default route is active

2011-04-14 Thread Jo-Philipp Wich
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. ~ Jow ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org

Re: [OpenWrt-Devel] How to recognize if a default route is active

2011-04-14 Thread ZioPRoTo (Saverio Proto)
I have however a designed issue. At the moment a bash daemon periodically checks if the wan interface is up. If the check is positive then the mesh daemon advertise this gateway, otherwise the mesh interface is set as default route. in the OLSR routing protocol implementation, we have a