[Olsr-users] Executing a script of routing changes
Mitar
(spam-protected)
Sat Nov 6 01:26:49 CET 2010
Hi!
On Sat, Nov 6, 2010 at 12:24 AM, Diego Woitasen <(spam-protected)> wrote:
> I'm using Robin Mesh and it comes with olsrd. Is it possible to
> execute a script when Olsrd changes the routes? I need to execute a
> script that changes some iptable rules when the default gw changes.
We made actions plugin for OLSR for this purpose:
http://wlan-lj.net/browser/trunk/openwrt-200901/package/olsrd/plugins/actions
http://wlan-lj.net/svn/trunk/openwrt-200901/package/olsrd/plugins/actions/
For example, we run it like this:
LoadPlugin "olsrd_actions.so.0.1"
{
PlParam "trigger" "0.0.0.0>/etc/actions.d/olsr_gateway_action"
PlParam "trigger" "10.254.0.1>/etc/actions.d/olsr_dns_action"
PlParam "trigger" "10.254.0.2>/etc/actions.d/olsr_dns_action"
}
So if route to default gateway or dns server is made or it drops shell
script is called. We use this to get node into "isolation" mode where
we display special splash page for all request going outside of the
mesh telling the user that there is currently no connection and we are
sorry, but that he/she can help by making a node. It is much better
than that request just timeout.
Mitar
More information about the Olsr-users
mailing list