[OpenWrt-Devel] watchping

Bruno Randolf br1 at einfach.org
Fri Jul 3 07:03:20 EDT 2015


Hi,

Sometimes it's necessary to re-configure an OpenWRT system based on the
fact wether Internet connectivity is available on a certain interface.
That the 'wan' interface is up, does not necessarily mean that Internet
is available (an upstream device or router may be down or configured
wrongly), so we want to check if we can actually get a ping reply.

One example where this is useful is: When Internet is available, we
configure BATMAN to act as a gateway 'server', if not as a gateway 'client'.

Another example could be, wether to activate a 3G data connection as
fallback for Ethernet WAN or not.

So far I have been using 'watchping' from the 'libre-mesh' project [1],
but it is plaqued by concurrency issues and other problems, so I am
considering to write a little C program which uses 'ubus' to directly
listen to 'netifd' ifup/down events, does the 'pings' and which could
expose the results (Internet available or not) via ubus as well.

I am writing here to ask wether someone has done this already, or if
there are any other concerns or opinions. Please let me know!

Greetings,
bruno

[1]
https://github.com/libre-mesh/lime-packages/tree/develop/packages/watchping
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list