#!/bin/sh

[ "$INTERFACE" = wan ] || exit

# Internet connectivity via WAN is down, reroute all locally generated traffic
# over the mesh network.
logger -t freifunk-pingcheck "WAN is down, rerouting all local traffic over the mesh network"
ip rule add prio 3000 iif lo lookup olsr-tunnel
ip rule add prio 3001 iif lo lookup olsr-default
