@@ -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 100644
@@ -0,0 +1,25 @@
+[ "$ACTION" = 'ifup' ] || exit 0
+
+config_load simple-tc
+
+tc_interface() {
+ local iface="$1"
+
+ config_get ifname "$iface" ifname
+
+ [ "$DEVICE" = "$ifname" ] || return
+
+ config_get_bool enabled "$iface" enabled 0
+
+ [ "$enabled" -eq 1 ] || return
+
+ config_get limit_ingress "$iface" limit_ingress
+ config_get limit_egress "$iface" limit_egress
+
+ [ "$limit_ingress" ] || limit_ingress=-
+ [ "$limit_egress" ] || limit_egress=-
+
+ simple-tc "$DEVICE" "$limit_ingress" "$limit_egress"
+}
+
+config_foreach tc_interface 'interface'
@@ -32,6 +32,9 @@ if [ "$REQUEST_METHOD" == "POST" ] ; then
uci -q set "simple-tc.example.limit_egress=${POST_limit_egress}"
uci commit
+
+ /etc/init.d/network restart # Bitratenbegrenzung ohne Neustart
+
MSG='<span class="green">Daten gespeichert! - Bitte Router neustarten.</span>'
fi
fi