This is the nftables implementation for qos on OpenWrt, Currently, it has below features: * Static QoS : setting limit rate for devices or global network. * Dynamic/Auto QoS : setting limit rate according to the network bandwidth and adjust itself automatically (hotplug event). * Traffic Priority : this feature is like traffic shaping under tc, it uses ingress hook to handle to packets here. Signed-off-by: Rosy Song <rosysong@rosinson.com>
13 lines
360 B
Bash
13 lines
360 B
Bash
#!/bin/sh
|
|
#
|
|
# Copyright 2018 rosysong@rosinson.com
|
|
#
|
|
|
|
. /lib/nft-qos/monitor.sh
|
|
|
|
logger -t nft-qos-monitor "ACTION=$ACTION, MACADDR=$MACADDR, IPADDR=$IPADDR, HOSTNAME=$HOSTNAME"
|
|
|
|
case "$ACTION" in
|
|
add | update) qosdef_init_env && qosdef_monitor_add $MACADDR $IPADDR $HOSTNAME;;
|
|
remove) qosdef_init_env && qosdef_monitor_del $MACADDR $IPADDR $HOSTNAME;;
|
|
esac
|