#!/bin/sh

. /usr/share/libubox/jshn.sh

json_load "`cat /tmp/cache/systeminfo/ethinfo.info`"
json_get_var ppp_net_section "ppp_net_section"

demand=`uci get network.$ppp_net_section.connmode`
[ "$demand" != "1" ] && exit

logger -t firewall "Reloading firewall due to ifup of $IFNAME"

/usr/sbin/net-wall restart
echo 1 > /proc/sys/dni_netfilter/flush_conntrack_table

