@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-network
-PKG_VERSION:=0.0.6
+PKG_VERSION:=7
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-network
new file mode 100755
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+tc_device=$(uci -q get "network.wan.ifname")
+tc_enabled=$(uci -q get "simple-tc.example.enabled")
+tc_in=$(uci -q get "simple-tc.example.limit_ingress")
+tc_out=$(uci -q get "simple-tc.example.limit_egress")
+
+if [ "$tc_enabled" -eq 1 ] ; then
+ test -n "$tc_in" || tc_in=-
+ test -n "$tc_out" || tc_out=-
+ simple-tc "$tc_device" "$tc_in" "$tc_out"
+else
+ simple-tc "$tc_device" - -
+fi
@@ -189,3 +189,15 @@ else
/etc/init.d/fff-uradvd restart
fi
+
+# Apply traffic control
+tc_device=$(uci -q get "network.wan.ifname")
+tc_enabled=$(uci -q get "simple-tc.example.enabled")
+tc_in=$(uci -q get "simple-tc.example.limit_ingress")
+tc_out=$(uci -q get "simple-tc.example.limit_egress")
+
+if [ "$tc_enabled" -eq 1 ] ; then
+ test -n "$tc_in" || tc_in=-
+ test -n "$tc_out" || tc_out=-
+ simple-tc "$tc_device" "$tc_in" "$tc_out"
+fi
@@ -32,6 +32,9 @@ if [ "$REQUEST_METHOD" == "POST" ] ; then
uci -q set "simple-tc.example.limit_egress=${POST_limit_egress}"
uci commit
+
+ /usr/sbin/applysimpletc
+
MSG='<span class="green">Daten gespeichert! - Bitte Router neustarten.</span>'
fi
fi